Added highbit() and lowbit() macros

Signed-off-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #562
This commit is contained in:
Tom Caputi 2016-07-14 15:51:24 -04:00 committed by Brian Behlendorf
parent 5ad98ad097
commit d2f97b2a26

View File

@ -158,6 +158,9 @@ extern uint32_t zone_get_hostid(void *zone);
extern void spl_setup(void);
extern void spl_cleanup(void);
#define highbit(x) __fls(x)
#define lowbit(x) __ffs(x)
#define highbit64(x) fls64(x)
#define makedevice(maj,min) makedev(maj,min)