ErGetTicks now locks while updating ticks

This commit is contained in:
Marty Kraimer committed 1999-07-07 19:54:46 +00:00
1 parent 772d6e199a
commit f0a195ee7d
2 files changed
+6

No files matched your search

+3
View File
@@ -219,13 +219,16 @@ long ErRegisterErrorHandler(int Card, ERROR_FUNC func)
******************************************************************************/
long ErGetTicks(int Card, unsigned long *Ticks)
{
int key;
if (ErHaveReceiver(Card) < 0)
return(-1);
/* BUG -- Do we read the HI first or the low? */
key = intLock();
*Ticks = ErLink[Card].pEr->EventCounterLo;
*Ticks += ErLink[Card].pEr->EventCounterHi << 16;
intUnlock(key);
return(0);
}
+3
View File
@@ -219,13 +219,16 @@ long ErRegisterErrorHandler(int Card, ERROR_FUNC func)
******************************************************************************/
long ErGetTicks(int Card, unsigned long *Ticks)
{
int key;
if (ErHaveReceiver(Card) < 0)
return(-1);
/* BUG -- Do we read the HI first or the low? */
key = intLock();
*Ticks = ErLink[Card].pEr->EventCounterLo;
*Ticks += ErLink[Card].pEr->EventCounterHi << 16;
intUnlock(key);
return(0);
}