We have to remove the thread's condition variable entries when
interrupted early, i.e. when signals were already pending when we started waiting. Fixes #1832. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24063 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -162,6 +162,12 @@ PrivateConditionVariableEntry::Wait(uint32 flags)
|
||||
&& (thread->sig_pending & ~thread->sig_block_mask) != 0)
|
||||
|| ((flags & B_KILL_CAN_INTERRUPT)
|
||||
&& (thread->sig_pending & KILL_SIGNALS))) {
|
||||
// remove all of the thread's entries from their variables
|
||||
entry = firstEntry;
|
||||
while (entry) {
|
||||
entry->_Remove();
|
||||
entry = entry->fThreadNext;
|
||||
}
|
||||
return B_INTERRUPTED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user