diff options
Diffstat (limited to 'src/chevents.c')
-rw-r--r-- | src/chevents.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/chevents.c b/src/chevents.c index 87f990c16..4dcf37a22 100644 --- a/src/chevents.c +++ b/src/chevents.c @@ -92,7 +92,6 @@ void chEvtClear(t_eventmask mask) { */
void chEvtSend(EventSource *esp) {
EventListener *elp;
- BOOL flag = FALSE;
chSysLock();
@@ -102,11 +101,10 @@ void chEvtSend(EventSource *esp) { tp->p_epending |= EventMask(elp->el_id);
if ((tp->p_state == PRWTEVENT) && (tp->p_epending & tp->p_ewmask))
- chSchReadyI(tp), flag = TRUE;
+ chSchReadyI(tp);
elp = elp->el_next;
}
- if (flag)
- chSchRescheduleI();
+ chSchRescheduleI();
chSysUnlock();
}
@@ -174,7 +172,7 @@ static void unwait(void *p) { // Test removed, it should never happen.
// if (((Thread *)p)->p_state == PRWTEVENT)
- chSchReadyI(dequeue(p))->p_rdymsg = RDY_TIMEOUT;
+ chSchReadyI(p)->p_rdymsg = RDY_TIMEOUT;
}
/**
|