diff options
author | Eric Badger <badger@FreeBSD.org> | 2016-08-15 20:09:09 +0000 |
---|---|---|
committer | Eric Badger <badger@FreeBSD.org> | 2016-08-15 20:09:09 +0000 |
commit | b0f2185bbefaf7e9fdaa50ecb658b9790e835bd9 (patch) | |
tree | 23643c9dbe1f9b4199cbe514eb676c7e89bba2f6 /sys | |
parent | ed12504ac7ffd19518fe0345575abe476a31163c (diff) | |
download | src-test2-b0f2185bbefaf7e9fdaa50ecb658b9790e835bd9.tar.gz src-test2-b0f2185bbefaf7e9fdaa50ecb658b9790e835bd9.zip |
Notes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_umtx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 8471591e648d..33eb8bca43cc 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -3123,7 +3123,6 @@ do_sem_wake(struct thread *td, struct _usem *sem) umtxq_busy(&key); cnt = umtxq_count(&key); if (cnt > 0) { - umtxq_signal(&key, 1); /* * Check if count is greater than 0, this means the memory is * still being referenced by user code, so we can safely @@ -3136,6 +3135,7 @@ do_sem_wake(struct thread *td, struct _usem *sem) if (error == -1) error = EFAULT; } + umtxq_signal(&key, 1); } umtxq_unbusy(&key); umtxq_unlock(&key); @@ -3235,8 +3235,6 @@ do_sem2_wake(struct thread *td, struct _usem2 *sem) umtxq_busy(&key); cnt = umtxq_count(&key); if (cnt > 0) { - umtxq_signal(&key, 1); - /* * If this was the last sleeping thread, clear the waiters * flag in _count. @@ -3251,6 +3249,8 @@ do_sem2_wake(struct thread *td, struct _usem2 *sem) error = EFAULT; umtxq_lock(&key); } + + umtxq_signal(&key, 1); } umtxq_unbusy(&key); umtxq_unlock(&key); |