summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_mutex.c11
-rw-r--r--sys/kern/kern_sx.c8
-rw-r--r--sys/kern/subr_turnstile.c11
3 files changed, 30 insertions, 0 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index a79398b..d5a1b09 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -782,6 +782,17 @@ mtx_validate(struct mtx *m)
#endif
/*
+ * General init routine used by the MTX_SYSINIT() macro.
+ */
+void
+mtx_sysinit(void *arg)
+{
+ struct mtx_args *margs = arg;
+
+ mtx_init(margs->ma_mtx, margs->ma_desc, margs->ma_opts);
+}
+
+/*
* Mutex initialization routine; initialize lock `m' of type contained in
* `opts' with options contained in `opts' and description `description.'
*/
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index dda9fe7..fb6647d 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -53,6 +53,14 @@ struct lock_class lock_class_sx = {
#endif
void
+sx_sysinit(void *arg)
+{
+ struct sx_args *sargs = arg;
+
+ sx_init(sargs->sa_sx, sargs->sa_desc);
+}
+
+void
sx_init(struct sx *sx, const char *description)
{
struct lock_object *lock;
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index a79398b..d5a1b09 100644
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -782,6 +782,17 @@ mtx_validate(struct mtx *m)
#endif
/*
+ * General init routine used by the MTX_SYSINIT() macro.
+ */
+void
+mtx_sysinit(void *arg)
+{
+ struct mtx_args *margs = arg;
+
+ mtx_init(margs->ma_mtx, margs->ma_desc, margs->ma_opts);
+}
+
+/*
* Mutex initialization routine; initialize lock `m' of type contained in
* `opts' with options contained in `opts' and description `description.'
*/
OpenPOWER on IntegriCloud