mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
If a thread is cancelled, it may have already consumed a umtx_wake,
check waiter and semphore counter to see if we may wake up next thread.
This commit is contained in:
parent
2b71cf8696
commit
150b71918c
1 changed files with 2 additions and 0 deletions
|
|
@ -178,6 +178,8 @@ sem_cancel_handler(void *arg)
|
|||
sem_t *sem = arg;
|
||||
|
||||
atomic_add_int(&(*sem)->nwaiters, -1);
|
||||
if ((*sem)->nwaiters && (*sem)->count)
|
||||
_thr_umtx_wake(&(*sem)->count, 1);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in a new issue