Page MenuHomeFreeBSD

D26681.id77895.diff
No OneTemporary

D26681.id77895.diff

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

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)

Event Timeline