h2: Fix bluetooth driver build, missing PrivateKernelHeaders
* We likely should move all of this stuff to normal atomic test and set operations at some point.
This commit is contained in:
@@ -37,15 +37,6 @@
|
||||
#pragma mark - Kernel Auxiliary Stuff -
|
||||
#endif
|
||||
|
||||
/* tricking bits */
|
||||
#define SET_BIT(byte,bit_mask) {byte|=bit_mask;}
|
||||
#define CLEAR_BIT(byte,bit_mask) {byte&=~bit_mask;}
|
||||
#define GET_BIT(byte,bit_mask) ((byte&bit_mask)!=0)
|
||||
#define TOOGLE_BIT(byte,bit_mask) {byte^=bit_mask;}
|
||||
|
||||
//#define TEST_AND_SET(byte,bit_mask) (((byte|=bit_mask)&bit_mask)!=0)
|
||||
//#define TEST_AND_CLEAR(byte,bit_mask) (((byte&=~bit_mask)&bit_mask)!=0)
|
||||
|
||||
static inline uint32 TEST_AND_SET(uint32 *byte, uint32 bit_mask) {
|
||||
|
||||
uint32 val = (*byte&bit_mask)!=0;
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
#define CHECK_BIT(a, b) ((a) & (1 << (b)))
|
||||
#define SET_BIT(a, b) ((a) | (1 << (b)))
|
||||
#define CLEAR_BIT(a, b) ((a) & (~(1 << (b))))
|
||||
#define GET_BIT(a, b) ((a & b) != 0)
|
||||
#define TOOGLE_BIT(a, b) (a ^= b)
|
||||
|
||||
|
||||
/* during kernel startup, interrupts are disabled (among other things) */
|
||||
extern bool gKernelStartup;
|
||||
|
||||
Reference in New Issue
Block a user