http://git.etherboot.org
/
people
/
andreif
/
gpxe.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add fls() for non-constant values.
[people/andreif/gpxe.git]
/
src
/
core
/
bitops.c
1
#include <strings.h>
2
3
int __flsl ( long x ) {
4
int r = 0;
5
6
for ( r = 0 ; x ; r++ ) {
7
x >>= 1;
8
}
9
return r;
10
}