Back to index

numactl  2.0.8~rc4
Defines | Functions
bitops.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BITS_PER_LONG   (sizeof(unsigned long) * 8)
#define BYTES_PER_LONG   (sizeof(long))
#define test_bit(i, p)   ((p)[(i) / BITS_PER_LONG] & (1UL << ((i)%BITS_PER_LONG)))
#define set_bit(i, p)   ((p)[(i) / BITS_PER_LONG] |= (1UL << ((i)%BITS_PER_LONG)))
#define clear_bit(i, p)   ((p)[(i) / BITS_PER_LONG] &= ~(1UL << ((i)%BITS_PER_LONG)))

Functions

int find_first_bit (void *mask, int max)

Define Documentation

#define BITS_PER_LONG   (sizeof(unsigned long) * 8)

Definition at line 4 of file bitops.h.

#define BYTES_PER_LONG   (sizeof(long))

Definition at line 5 of file bitops.h.

#define clear_bit (   i,
 
)    ((p)[(i) / BITS_PER_LONG] &= ~(1UL << ((i)%BITS_PER_LONG)))

Definition at line 9 of file bitops.h.

#define set_bit (   i,
 
)    ((p)[(i) / BITS_PER_LONG] |= (1UL << ((i)%BITS_PER_LONG)))

Definition at line 8 of file bitops.h.

#define test_bit (   i,
 
)    ((p)[(i) / BITS_PER_LONG] & (1UL << ((i)%BITS_PER_LONG)))

Definition at line 7 of file bitops.h.


Function Documentation

int find_first_bit ( void *  mask,
int  max 
)

Definition at line 4 of file bitops.c.

{
       unsigned long *mask = m;
       int i;
       for (i = 0; i < max; i++) {
              if (test_bit(i, mask))
                     break;               
       }
       return i;
}

Here is the caller graph for this function: