From 3fb9f2f2424e7b4c810d2c87037083f15adc0e3b Mon Sep 17 00:00:00 2001 From: attilio Date: Tue, 29 May 2007 19:46:37 +0000 Subject: [PATCH] style(9) fixes for sx locks. Approved by: jeff (mentor) --- sys/kern/kern_sx.c | 4 ++-- sys/sys/sx.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c index 2a25fdcbe0fd..421c1d1438dc 100644 --- a/sys/kern/kern_sx.c +++ b/sys/kern/kern_sx.c @@ -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); diff --git a/sys/sys/sx.h b/sys/sys/sx.h index a65030e66226..0c6406cb39f1 100644 --- a/sys/sys/sx.h +++ b/sys/sys/sx.h @@ -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)