summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_rmlock.c7
-rw-r--r--sys/sys/rmlock.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/kern_rmlock.c b/sys/kern/kern_rmlock.c
index 5a91811..276aee6 100644
--- a/sys/kern/kern_rmlock.c
+++ b/sys/kern/kern_rmlock.c
@@ -175,6 +175,13 @@ rm_destroy(struct rmlock *rm)
lock_destroy(&rm->lock_object);
}
+int
+rm_wowned(struct rmlock *rm)
+{
+
+ return (mtx_owned(&rm->rm_lock));
+}
+
void
rm_sysinit(void *arg)
{
diff --git a/sys/sys/rmlock.h b/sys/sys/rmlock.h
index 04ccb38..ab0b566 100644
--- a/sys/sys/rmlock.h
+++ b/sys/sys/rmlock.h
@@ -42,6 +42,7 @@
void rm_init(struct rmlock *rm, const char *name, int opts);
void rm_destroy(struct rmlock *rm);
+int rm_wowned(struct rmlock *rm);
void rm_sysinit(void *arg);
OpenPOWER on IntegriCloud