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.
This commit is contained in:
John Baldwin 2003-03-11 20:02:57 +00:00
parent 740190593a
commit 75d468ee12
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112108
3 changed files with 2 additions and 7 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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 */
/*