fixed launchpad bug 697509, Thread synchronization issue in libCom/osi/os/WIN32/osdTime.cpp

This commit is contained in:
Jeff Hill
2011-11-10 17:34:47 -07:00
parent 652235ef13
commit 6ef52b5d03

View File

@@ -395,6 +395,8 @@ void currentTime::getCurrentTime ( epicsTimeStamp & dest )
//
epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
{
EnterCriticalSection ( & this->mutex );
// avoid interruptions by briefly becoming a time critical thread
LARGE_INTEGER curFileTime;
LARGE_INTEGER curPerfCounter;
@@ -410,8 +412,6 @@ epicsTimerNotify::expireStatus currentTime::expire ( const epicsTime & )
curFileTime.HighPart = ft.dwHighDateTime;
}
EnterCriticalSection ( & this->mutex );
LONGLONG perfCounterDiff;
if ( curPerfCounter.QuadPart >= this->lastPerfCounterPLL ) {
perfCounterDiff = curPerfCounter.QuadPart - this->lastPerfCounterPLL;