From 4e63974471c4e2f11781cda163e0dc2ac6fb72f9 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 24 Feb 2015 16:19:14 +0100 Subject: Add minor comment --- lib/birdlib.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/birdlib.h b/lib/birdlib.h index d107c399..94054769 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -33,6 +33,10 @@ #define ABS(a) ((a)>=0 ? (a) : -(a)) #define ARRAY_SIZE(a) (sizeof(a)/sizeof(*(a))) + +/* Bitfield macros */ + +/* b is u32 array (or ptr), l is size of it in bits (multiple of 32), p is 0..(l-1) */ #define BIT32_VAL(p) (((u32) 1) << ((p) % 32)) #define BIT32_TEST(b,p) ((b)[(p)/32] & BIT32_VAL(p)) #define BIT32_SET(b,p) ((b)[(p)/32] |= BIT32_VAL(p)) -- cgit v1.2.3