diff options
author | jhb <jhb@FreeBSD.org> | 2003-03-11 20:02:57 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-03-11 20:02:57 +0000 |
commit | 97c1e71ca25f36b6f93ab676d6cbaa01dea724e0 (patch) | |
tree | ab41f36761f18265bcbe6011752acb2cdc5a9f68 | |
parent | 8c7bd008361effe8a37fb3bbd5fd122fb77a9df8 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | sys/kern/kern_mutex.c | 4 | ||||
-rw-r--r-- | sys/kern/subr_turnstile.c | 4 | ||||
-rw-r--r-- | sys/sys/mutex.h | 1 |
3 files changed, 2 insertions, 7 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) diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 9f59577..4dc1967 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.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) diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index 17d6d59..2df9e43 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -56,7 +56,6 @@ #define MTX_SPIN 0x00000001 /* Spin lock (disables interrupts) */ #define MTX_RECURSE 0x00000004 /* Option: lock allowed to recurse */ #define MTX_NOWITNESS 0x00000008 /* Don't do any witness checking. */ -#define MTX_SLEEPABLE 0x00000010 /* We can sleep with this lock. */ #define MTX_DUPOK 0x00000020 /* Don't log a duplicate acquire */ /* |