aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2008-04-07 14:46:38 +0000
committerAttilio Rao <attilio@FreeBSD.org>2008-04-07 14:46:38 +0000
commite0f62984c1f53dfc174a2958ab23ef3c7c52f5c1 (patch)
treeb6a3688122ffa2d58f1113be86a4af4d90cc2b52 /sys/kern/kern_lock.c
parentfc9299dd1b0626f079881e3005a32ef52886b905 (diff)
downloadsrc-e0f62984c1f53dfc174a2958ab23ef3c7c52f5c1.tar.gz
src-e0f62984c1f53dfc174a2958ab23ef3c7c52f5c1.zip
- Use a different encoding for lockmgr options: make them encoded by
bit in order to allow per-bit checks on the options flag, in particular in the consumers code [1] - Re-enable the check against TDP_DEADLKTREAT as the anti-waiters starvation patch allows exclusive waiters to override new shared requests. [1] Requested by: pjd, jeff
Notes
Notes: svn path=/head/; revision=177982
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 93c262b44c33..7722c15c1c5f 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -88,7 +88,7 @@ CTASSERT(((LK_CANRECURSE | LK_NOSHARE) & LO_CLASSFLAGS) ==
((x) & LK_NOWAIT)
#define LK_CAN_SHARE(x) \
(((x) & LK_SHARE) && (((x) & LK_EXCLUSIVE_WAITERS) == 0 || \
- curthread->td_lk_slocks))
+ curthread->td_lk_slocks || (curthread->td_pflags & TDP_DEADLKTREAT)))
#define lockmgr_disowned(lk) \
(((lk)->lk_lock & ~(LK_FLAGMASK & ~LK_SHARE)) == LK_KERNPROC)