Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107364945
D30501.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
541 B
Referenced Files
None
Subscribers
None
D30501.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h
--- a/sys/compat/linuxkpi/common/include/linux/bitops.h
+++ b/sys/compat/linuxkpi/common/include/linux/bitops.h
@@ -63,6 +63,11 @@
#define hweight64(x) bitcount64(x)
#define hweight_long(x) bitcountl(x)
+#define HWEIGHT8(x) (bitcount8((uint8_t)(x)) + 1)
+#define HWEIGHT16(x) (bitcount16(x) + 1)
+#define HWEIGHT32(x) (bitcount32(x) + 1)
+#define HWEIGHT64(x) (bitcount64(x) + 1)
+
static inline int
__ffs(int mask)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 14, 2:36 AM (20 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15790194
Default Alt Text
D30501.diff (541 B)
Attached To
Mode
D30501: LinuxKPI: add HWEIGHT32()
Attached
Detach File
Event Timeline
Log In to Comment