File: bitops.c

package info (click to toggle)
numactl 2.0.5-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 532 kB
  • ctags: 632
  • sloc: ansic: 5,054; sh: 321; makefile: 139; perl: 59
file content (13 lines) | stat: -rwxr-xr-x 197 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "bitops.h"

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