File: bitops.c

package info (click to toggle)
numactl 2.0.8~rc4-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 784 kB
  • sloc: ansic: 5,765; sh: 363; makefile: 150; 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;
}