fix unguard needs to be moved inside of sate test (that needs to be guarded)

This commit is contained in:
Jeff Hill
2004-01-24 00:13:59 +00:00
parent 57420c3e3c
commit 36ffaa3968

View File

@@ -156,12 +156,10 @@ void timer::cancel ()
if ( this->queue.processThread != epicsThreadGetIdSelf() ) {
// make certain timer expire() does not run after cancel () returns,
// but dont require that lock is applied while calling expire()
{
while ( this->queue.cancelPending &&
this->queue.pExpireTmr == this ) {
epicsGuardRelease < epicsMutex > autoRelease ( locker );
while ( this->queue.cancelPending &&
this->queue.pExpireTmr == this ) {
this->queue.cancelBlockingEvent.wait ();
}
this->queue.cancelBlockingEvent.wait ();
}
// in case other threads are waiting
wakeupCancelBlockingThreads = true;