Files
xemu/linux-headers/linux/bits.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
444 B
C
Raw Normal View History

2024-04-23 11:46:47 +02:00
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/* bits.h: Macros for dealing with bitmasks. */
#ifndef _LINUX_BITS_H
#define _LINUX_BITS_H
2025-06-19 20:09:19 +02:00
#define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
2024-04-23 11:46:47 +02:00
2025-06-19 20:09:19 +02:00
#define __GENMASK_ULL(h, l) (((~_ULL(0)) << (l)) & (~_ULL(0) >> (__BITS_PER_LONG_LONG - 1 - (h))))
2024-04-23 11:46:47 +02:00
2024-10-28 10:38:09 +08:00
#define __GENMASK_U128(h, l) \
((_BIT128((h)) << 1) - (_BIT128(l)))
2024-04-23 11:46:47 +02:00
#endif /* _LINUX_BITS_H */