Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146134351
D32091.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
662 B
Referenced Files
None
Subscribers
None
D32091.id.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/xarray.h b/sys/compat/linuxkpi/common/include/linux/xarray.h
--- a/sys/compat/linuxkpi/common/include/linux/xarray.h
+++ b/sys/compat/linuxkpi/common/include/linux/xarray.h
@@ -97,4 +97,27 @@
xa_init_flags(xa, 0);
}
+static inline void *
+xa_mk_value(unsigned long v)
+{
+ unsigned long r = (v << 1) | 1;
+
+ return ((void *)r);
+}
+
+static inline bool
+xa_is_value(const void *e)
+{
+ unsigned long v = (unsigned long)e;
+
+ return (v & 1);
+}
+
+static inline unsigned long
+xa_to_value(const void *e)
+{
+ unsigned long v = (unsigned long)e;
+
+ return (v >> 1);
+}
#endif /* _LINUX_XARRAY_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 1, 2:53 AM (5 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29093264
Default Alt Text
D32091.id.diff (662 B)
Attached To
Mode
D32091: LinuxKPI: Add helper functions to store integers to linux/xarray.h
Attached
Detach File
Event Timeline
Log In to Comment