VSF Documented
bits.h
Go to the documentation of this file.
1#ifndef __VSF_LINUX_BITS_H__
2#define __VSF_LINUX_BITS_H__
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#ifndef BIT
9# define BIT(__NR) (1UL << (__NR))
10#endif
11#ifndef BIT_ULL
12# define BIT_ULL(__NR) (1ULL << (__NR))
13#endif
14
15#define BITS_PER_LONG (sizeof(long) << 3)
16#define GENMASK(__H, __L) (((~0UL) << (__L)) & (~0UL >> (BITS_PER_LONG - 1 - (__H))))
17
18#ifdef __cplusplus
19}
20#endif
21
22#endif