]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Add minor comment
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 24 Feb 2015 15:19:14 +0000 (16:19 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 24 Feb 2015 15:19:14 +0000 (16:19 +0100)
lib/birdlib.h

index d107c3999f89477f537a64469414bc36f2bd5d5e..94054769f6efd6bce48359df6a1da86e44e94231 100644 (file)
 #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))