Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153493681
D56446.id175713.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
751 B
Referenced Files
None
Subscribers
None
D56446.id175713.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/xarray.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/xarray.h
+++ sys/compat/linuxkpi/common/include/linux/xarray.h
@@ -54,6 +54,18 @@
uint32_t xa_flags; /* see XA_FLAGS_XXX */
};
+#define DEFINE_XARRAY_FLAGS(name, flags) \
+ struct xarray name = { \
+ .xa_head.gfp_mask = GFP_NOWAIT, \
+ .xa_flags = flags, \
+ }; \
+ MTX_SYSINIT(name ## _mtx, &name.xa_lock, \
+ "linuxkpi_DEFINE_XARRAY(" #name ")", \
+ MTX_DEF | MTX_RECURSE)
+
+#define DEFINE_XARRAY(name) DEFINE_XARRAY_FLAGS(name, 0)
+#define DEFINE_XARRAY_ALLOC(name) DEFINE_XARRAY_FLAGS(name, XA_FLAGS_ALLOC)
+
struct xa_limit {
uint32_t max;
uint32_t min;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 11:23 AM (15 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31942879
Default Alt Text
D56446.id175713.diff (751 B)
Attached To
Mode
D56446: linuxkpi: Define `DEFINE_XARRAY*()` macros
Attached
Detach File
Event Timeline
Log In to Comment