summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mutex.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-03-11 20:02:57 +0000
committerjhb <jhb@FreeBSD.org>2003-03-11 20:02:57 +0000
commit97c1e71ca25f36b6f93ab676d6cbaa01dea724e0 (patch)
treeab41f36761f18265bcbe6011752acb2cdc5a9f68 /sys/kern/kern_mutex.c
parent8c7bd008361effe8a37fb3bbd5fd122fb77a9df8 (diff)
downloadFreeBSD-src-97c1e71ca25f36b6f93ab676d6cbaa01dea724e0.zip
FreeBSD-src-97c1e71ca25f36b6f93ab676d6cbaa01dea724e0.tar.gz
Axe the useless MTX_SLEEPABLE flag. mutexes are not sleepable locks.
Nothing used this flag and WITNESS would have panic'd during mtx_init() if anything had.
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r--sys/kern/kern_mutex.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 9f59577..4dc1967 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -911,7 +911,7 @@ mtx_init(struct mtx *m, const char *name, const char *type, int opts)
struct lock_object *lock;
MPASS((opts & ~(MTX_SPIN | MTX_QUIET | MTX_RECURSE |
- MTX_SLEEPABLE | MTX_NOWITNESS | MTX_DUPOK)) == 0);
+ MTX_NOWITNESS | MTX_DUPOK)) == 0);
#ifdef MUTEX_DEBUG
/* Diagnostic and error correction */
@@ -932,8 +932,6 @@ mtx_init(struct mtx *m, const char *name, const char *type, int opts)
lock->lo_flags = LO_QUIET;
if (opts & MTX_RECURSE)
lock->lo_flags |= LO_RECURSABLE;
- if (opts & MTX_SLEEPABLE)
- lock->lo_flags |= LO_SLEEPABLE;
if ((opts & MTX_NOWITNESS) == 0)
lock->lo_flags |= LO_WITNESS;
if (opts & MTX_DUPOK)
OpenPOWER on IntegriCloud