| Log Message: |
Close races in the pthread_condvar implementation in 6.x, note that
7.x and beyond have very different implementations and these fixes
do not apply.
In the kernel:
Move the flag UQF_UMTXQ from the thread's td_flags where it was
unlocked to the umtx_q struct where it now has locking.
Nuke the UMTX_DYNAMIC_SHARED define while here, it's unused and
complex.
Refactor do_wait so that if we get a signal or timeout AND woken
up, we forward the wakeup to any other waiters pending to avoid
a missed wakeup.
In userland:
Bring over some fixes from DragonFlyBSD for the userland part of
pthread_condvars, basically relax the consistency on the number of
waiters and signals pending because it was both too strict and
incorrect causing lost wakeups.
Reviewed by: davidxu
Approved by: re
|