]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Added highbit() and lowbit() macros
authorTom Caputi <tcaputi@datto.com>
Thu, 14 Jul 2016 19:51:24 +0000 (15:51 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Jul 2016 17:28:46 +0000 (10:28 -0700)
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

include/sys/sysmacros.h

index 4a96e075ff3fc51c7f9b0b3bccf3f8a07c02ee5e..f6b1e28e8dc84e05b7b983d29a22dbf5b3b7153a 100644 (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)