Comment 9 for bug 697509

Revision history for this message
Jeff Hill (johill-lanl) wrote :

agree with your assessment of situation. Committed this fix to the R3.14 branch (revision12291).

=== modified file 'src/libCom/osi/os/WIN32/osdTime.cpp'
--- src/libCom/osi/os/WIN32/osdTime.cpp 2011-11-11 00:22:22 +0000
+++ src/libCom/osi/os/WIN32/osdTime.cpp 2011-11-11 00:31:27 +0000
@@ -395,6 +395,8 @@
 //
 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 @@
         curFileTime.HighPart = ft.dwHighDateTime;
     }

- EnterCriticalSection ( & this->mutex );
-
     LONGLONG perfCounterDiff;
     if ( curPerfCounter.QuadPart >= this->lastPerfCounterPLL ) {
         perfCounterDiff = curPerfCounter.QuadPart - this->lastPerfCounterPLL;