A thread sets MASK_WAITING before it begins spinning and the spinning wait is essentially waiting for that mask to be cleared. But this isn't a reliable protocol. Another thread may break in and set that mask, making the current thread miss the wakeup.
In
ReallyWaitForConditionVariable()
fromsrc/condition_variabe.c
:A thread sets
MASK_WAITING
before it begins spinning and the spinning wait is essentially waiting for that mask to be cleared. But this isn't a reliable protocol. Another thread may break in and set that mask, making the current thread miss the wakeup.