Back to index

numactl  2.0.8~rc4
bitops.h
Go to the documentation of this file.
00001 #ifndef BITOPS_H
00002 #define BITOPS_H 1
00003 
00004 #define BITS_PER_LONG (sizeof(unsigned long) * 8)
00005 #define BYTES_PER_LONG (sizeof(long))
00006 
00007 #define test_bit(i,p)  ((p)[(i) / BITS_PER_LONG] &   (1UL << ((i)%BITS_PER_LONG)))
00008 #define set_bit(i,p)   ((p)[(i) / BITS_PER_LONG] |=  (1UL << ((i)%BITS_PER_LONG)))
00009 #define clear_bit(i,p) ((p)[(i) / BITS_PER_LONG] &= ~(1UL << ((i)%BITS_PER_LONG)))
00010 
00011 extern int find_first_bit(void *mask, int max);
00012 
00013 #endif