Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162008839
D26681.id77895.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
543 B
Referenced Files
None
Subscribers
None
D26681.id77895.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/bitfield.h
===================================================================
--- /dev/null
+++ sys/compat/linuxkpi/common/include/linux/bitfield.h
@@ -0,0 +1,16 @@
+/* Public domain. */
+
+#ifndef _LINUX_BITFIELD_H
+#define _LINUX_BITFIELD_H
+
+#include <asm/byteorder.h>
+
+#define __bf_shf(x) (__builtin_ffsll(x) - 1)
+
+#define FIELD_GET(_m, _v) \
+ ((typeof(_m))(((_v) & (_m)) >> __bf_shf(_m)))
+
+#define FIELD_PREP(_m, _v) \
+ (((typeof(_m))(_v) << __bf_shf(_m)) & (_m))
+
+#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 9, 9:21 PM (19 h, 34 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34900539
Default Alt Text
D26681.id77895.diff (543 B)
Attached To
Mode
D26681: linuxkpi: Add bitfield.h
Attached
Detach File
Event Timeline
Log In to Comment