summaryrefslogtreecommitdiffstats
path: root/sys/sys/sx.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sys/sx.h')
-rw-r--r--sys/sys/sx.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/sys/sx.h b/sys/sys/sx.h
index 67f7d97..da16b60 100644
--- a/sys/sys/sx.h
+++ b/sys/sys/sx.h
@@ -118,18 +118,22 @@ int sx_chain(struct thread *td, struct thread **ownerp);
struct sx_args {
struct sx *sa_sx;
const char *sa_desc;
+ int sa_flags;
};
-#define SX_SYSINIT(name, sxa, desc) \
+#define SX_SYSINIT_FLAGS(name, sxa, desc, flags) \
static struct sx_args name##_args = { \
(sxa), \
- (desc) \
+ (desc), \
+ (flags) \
}; \
SYSINIT(name##_sx_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \
sx_sysinit, &name##_args); \
SYSUNINIT(name##_sx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \
sx_destroy, (sxa))
+#define SX_SYSINIT(name, sxa, desc) SX_SYSINIT_FLAGS(name, sxa, desc, 0)
+
/*
* Full lock operations that are suitable to be inlined in non-debug kernels.
* If the lock can't be acquired or released trivially then the work is
OpenPOWER on IntegriCloud