Back to index

numactl  2.0.8~rc4
bitops.c
Go to the documentation of this file.
00001 #include "bitops.h"
00002 
00003 /* extremly dumb */
00004 int find_first_bit(void *m, int max)
00005 {
00006        unsigned long *mask = m;
00007        int i;
00008        for (i = 0; i < max; i++) {
00009               if (test_bit(i, mask))
00010                      break;               
00011        }
00012        return i;
00013 }