fixed no termination from event remove loop if event queue is 100% full

This commit is contained in:
Jeff Hill
2003-01-30 15:48:41 +00:00
parent c5fe6a39d0
commit 6ce867d70d

View File

@@ -531,13 +531,16 @@ void epicsShareAPI db_cancel_event (dbEventSubscription es)
* would be possible.
*/
for ( getix = pevent->ev_que->getix;
pevent->ev_que->evque[getix] != EVENTQEMPTY;
getix = RNGINC ( getix ) ) {
pevent->ev_que->evque[getix] != EVENTQEMPTY; ) {
if ( pevent->ev_que->evque[getix] == pevent ) {
assert ( pevent->ev_que->nCanceled < USHRT_MAX );
pevent->ev_que->nCanceled++;
event_remove ( pevent->ev_que, getix, &canceledEvent );
}
getix = RNGINC ( getix );
if ( getix == pevent->ev_que->getix ) {
break;
}
}
assert ( pevent->npend == 0u );