opr: implement the BSD ffs() functions
authorBenjamin Kaduk <kaduk@mit.edu>
Wed, 14 Jan 2015 20:05:35 +0000 (15:05 -0500)
committerDaria Brashear <shadow@your-file-system.com>
Thu, 15 Jan 2015 12:28:34 +0000 (07:28 -0500)
commitd43699173e0e5ee5650974fcff105b38105c0422
treefa8a70e335049a661aaa896d396326b913d41663
parent6419d241866af95942d285b2e07dd510a43086f6
opr: implement the BSD ffs() functions

Provide opr implementations of ffs(), fls(), ffsll(), and flsll().
There is no need to provide the 'long' form, since int is 32 bits
and long long is 64 bits.

These functions return the index of the first (or last) bit set
in a given (long long) word, or zero if no bits are set.

Change-Id: I126000f8b650f41d67567a9af659e0805478af2d
Reviewed-on: http://gerrit.openafs.org/11671
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
src/opr/Makefile.in
src/opr/NTMakefile
src/opr/ffs.h [new file with mode: 0644]