take a lock when decrementing event queue quota because this is

no longer atomic on RISC processors
This commit is contained in:
Jeff Hill
2001-08-24 18:48:14 +00:00
parent 8ad35f4038
commit 9c892d128f
+2 -1
View File
@@ -478,19 +478,20 @@ void epicsShareAPI db_cancel_event (dbEventSubscription es)
* its call back changes
*/
LOCKEVQUE (pevent->ev_que)
pevent->user_sub = NULL;
while (pevent->npend || pevent->callBackInProgress) {
UNLOCKEVQUE(pevent->ev_que)
epicsEventWaitWithTimeout(pevent->ev_que->evUser->pflush_sem, 1.0);
LOCKEVQUE(pevent->ev_que)
}
UNLOCKEVQUE (pevent->ev_que)
/*
* Decrement event que quota
*/
pevent->ev_que->quota -= EVENTENTRIES;
UNLOCKEVQUE (pevent->ev_que)
freeListFree (dbevEventBlockFreeList, pevent);