Comment 0 for bug 697509

Revision history for this message
Alex Chen (alex-chen) wrote :

EPICS Base version 3.14.9

File: /src/libCom/osi/os/WIN32/osdTime.cpp

Function: epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )

Line 448: if ( curPerfCounter.QuadPart >= this->lastPerfCounter )

Problem: There is a thread synchronization issue which causes the 'curPerfCounter.QuadPart' to be less than the 'this->lastPerfCounter', and we will handle it as a roll over case. But actually this is not a roll over case, the 'this->lastPerfCounter' is changed by another thread which executes the 'void currentTime::getCurrentTime ( epicsTimeStamp & dest ) '

How to fix:
We can move line 445 ' EnterCriticalSection ( & this->mutex );' to the beginning of this function.