mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-21 16:32:25 +01:00
_thr_ucond_wait drops lock, we should pick it up again.
This commit is contained in:
parent
3f61998e1c
commit
a8a343d2e6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164927
@ -103,6 +103,7 @@ _pthread_barrier_wait(pthread_barrier_t *barrier)
|
||||
cycle = bar->b_cycle;
|
||||
do {
|
||||
_thr_ucond_wait(&bar->b_cv, &bar->b_lock, NULL, 0);
|
||||
THR_UMUTEX_LOCK(curthread, &bar->b_lock);
|
||||
/* test cycle to avoid bogus wakeup */
|
||||
} while (cycle == bar->b_cycle);
|
||||
THR_UMUTEX_UNLOCK(curthread, &bar->b_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user