summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-04-07 14:46:38 +0000
committerattilio <attilio@FreeBSD.org>2008-04-07 14:46:38 +0000
commitd5dbd847900d8be8342f4312c31741a96bd8a383 (patch)
treeb6a3688122ffa2d58f1113be86a4af4d90cc2b52 /sys/kern/kern_lock.c
parentbdfc7667fca4fb70f48fff5c0e4965ca46fed364 (diff)
downloadFreeBSD-src-d5dbd847900d8be8342f4312c31741a96bd8a383.zip
FreeBSD-src-d5dbd847900d8be8342f4312c31741a96bd8a383.tar.gz
- 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
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 93c262b..7722c15 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)
OpenPOWER on IntegriCloud