blob: 1bca9e47b09b2ea481709b1f7e335cdecbe8cb48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <strings.h>
FILE_LICENCE ( GPL2_OR_LATER );
int __flsl ( long x ) {
unsigned long value = x;
int ls = 0;
for ( ls = 0 ; value ; ls++ ) {
value >>= 1;
}
return ls;
}
|