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:
Ingo Weinhold
2008-02-22 14:51:11 +00:00
parent 949649daff
commit 23b95b112d
+6
View File
@@ -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;
}