Changeset 24063

Show
Ignore:
Timestamp:
02/22/08 08:51:11 (3 months ago)
Author:
bonefish
Message:
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.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • haiku/trunk/src/system/kernel/condition_variable.cpp

    r23980 r24063  
    163163                || ((flags & B_KILL_CAN_INTERRUPT) 
    164164                        && (thread->sig_pending & KILL_SIGNALS))) { 
     165                // remove all of the thread's entries from their variables 
     166                entry = firstEntry; 
     167                while (entry) { 
     168                        entry->_Remove(); 
     169                        entry = entry->fThreadNext; 
     170                } 
    165171                return B_INTERRUPTED; 
    166172        }