VSF Documented
bitops.h
Go to the documentation of this file.
1#ifndef __VSF_LINUX_BITOPS_H__
2#define __VSF_LINUX_BITOPS_H__
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8extern void set_bit(int nr, volatile unsigned long *addr);
9extern void clear_bit(int nr, volatile unsigned long *addr);
10
11// if test_bit is defined as a macro, do not implement test_bit here
12#ifndef test_bit
13static inline int test_bit(int nr, const unsigned long *addr)
14{
15 addr = &addr[nr / (sizeof(unsigned long) * 8)];
16 return !!(*addr & (1ULL << (nr & (sizeof(unsigned long) * 8 - 1))));
17}
18#endif
19
20#ifdef __cplusplus
21}
22#endif
23
24#endif
void set_bit(int nr, volatile unsigned long *addr)
void clear_bit(int nr, volatile unsigned long *addr)
Generated from commit: vsfteam/vsf@f8db8e8