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:
Alexander von Gluck IV
2014-05-18 22:33:56 -05:00
parent fd8693ea29
commit a8f9011015
6 changed files with 7 additions and 9 deletions
-9
View File
@@ -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;
+3
View File
@@ -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;