lib: Add atomic bit set/clear operations.

Add addtional functionlities for set/clear bits
atomically.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
Atish Patra
2019-01-20 23:23:28 -08:00
committed by Anup Patel
parent 784a4657c0
commit 312b6bf32f
5 changed files with 179 additions and 0 deletions

View File

@@ -26,4 +26,6 @@
#define STR(x) XSTR(x)
#define XSTR(x) #x
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
#endif