[coverity] 1543089 Data race condition
This commit is contained in:
parent
09060a9a49
commit
e4498df607
@ -881,12 +881,13 @@ static void* TimerQueueThread(void* arg)
|
|||||||
|
|
||||||
status = pthread_cond_timedwait(&(timerQueue->cond), &(timerQueue->cond_mutex), &timeout);
|
status = pthread_cond_timedwait(&(timerQueue->cond), &(timerQueue->cond_mutex), &timeout);
|
||||||
FireExpiredTimerQueueTimers(timerQueue);
|
FireExpiredTimerQueueTimers(timerQueue);
|
||||||
|
const BOOL bCancelled = timerQueue->bCancelled;
|
||||||
pthread_mutex_unlock(&(timerQueue->cond_mutex));
|
pthread_mutex_unlock(&(timerQueue->cond_mutex));
|
||||||
|
|
||||||
if ((status != ETIMEDOUT) && (status != 0))
|
if ((status != ETIMEDOUT) && (status != 0))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (timerQueue->bCancelled)
|
if (bCancelled)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user