style(9) fixes for sx locks.

Approved by: jeff (mentor)
This commit is contained in:
Attilio Rao 2007-05-29 19:46:37 +00:00
parent 3da3c3632e
commit 2c7289cbfa
2 changed files with 6 additions and 6 deletions

View File

@ -165,7 +165,7 @@ sx_init_flags(struct sx *sx, const char *description, int opts)
MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK |
SX_NOPROFILE | SX_ADAPTIVESPIN)) == 0);
flags = LO_SLEEPABLE | LO_UPGRADABLE | LO_RECURSABLE;
flags = LO_RECURSABLE | LO_SLEEPABLE | LO_UPGRADABLE;
if (opts & SX_DUPOK)
flags |= LO_DUPOK;
if (opts & SX_NOPROFILE)
@ -535,7 +535,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t tid, const char *file, int line)
CTR2(KTR_LOCK, "%s: %p resuming from sleep queue",
__func__, sx);
}
GIANT_RESTORE();
lock_profile_obtain_lock_success(&(sx)->lock_object, contested,
waitstart, file, line);

View File

@ -101,9 +101,9 @@
uintptr_t _tid = (uintptr_t)(tid); \
\
if (!atomic_cmpset_acq_ptr(&(sx)->sx_lock, SX_LOCK_UNLOCKED, \
_tid)) { \
_tid)) \
_sx_xlock_hard((sx), _tid, (file), (line)); \
} else \
else \
lock_profile_obtain_lock_success(&(sx)->lock_object, 0, \
0, (file), (line)); \
} while (0)
@ -123,9 +123,9 @@
\
if (!(x & SX_LOCK_SHARED) || \
!atomic_cmpset_acq_ptr(&(sx)->sx_lock, x, \
x + SX_ONE_SHARER)) { \
x + SX_ONE_SHARER)) \
_sx_slock_hard((sx), (file), (line)); \
} else \
else \
lock_profile_obtain_lock_success(&(sx)->lock_object, 0, \
0, (file), (line)); \
} while (0)