Skip to content

Commit

Permalink
Added highbit() and lowbit() macros
Browse files Browse the repository at this point in the history
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 openzfs#562
  • Loading branch information
Tom Caputi authored and behlendorf committed Jul 20, 2016
1 parent 5ad98ad commit d2f97b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/sys/sysmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d2f97b2

Please sign in to comment.