diff options
author | Mike Makonnen <mtm@FreeBSD.org> | 2003-07-18 21:26:45 +0000 |
---|---|---|
committer | Mike Makonnen <mtm@FreeBSD.org> | 2003-07-18 21:26:45 +0000 |
commit | 5c6edbec80ab1af47dd827b7e09e425ed4d18329 (patch) | |
tree | b3c089f22b8579d601f4cb6cdb7b0676bed1959b /sys/kern/kern_umtx.c | |
parent | ca49cf5aaf64ae997f26aee56398a1f70749ca72 (diff) | |
download | src-5c6edbec80ab1af47dd827b7e09e425ed4d18329.tar.gz src-5c6edbec80ab1af47dd827b7e09e425ed4d18329.zip |
Remove a lock held across casuptr() that snuck in last commit.
Notes
Notes:
svn path=/head/; revision=117745
Diffstat (limited to 'sys/kern/kern_umtx.c')
-rw-r--r-- | sys/kern/kern_umtx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 787155d6771c..f0a99e35031e 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -292,10 +292,13 @@ _umtx_unlock(struct thread *td, struct _umtx_unlock_args *uap) uq = umtx_lookup(td, umtx); if (uq != NULL && ((blocked = TAILQ_FIRST(&uq->uq_tdq)) != NULL && - TAILQ_NEXT(blocked, td_umtx) != NULL)) + TAILQ_NEXT(blocked, td_umtx) != NULL)) { + UMTX_UNLOCK(); old = casuptr((intptr_t *)&umtx->u_owner, UMTX_UNOWNED, UMTX_CONTESTED); - UMTX_UNLOCK(); + } else { + UMTX_UNLOCK(); + } } else { UMTX_UNLOCK(); old = casuptr((intptr_t *)&umtx->u_owner, |