aboutsummaryrefslogtreecommitdiffstats
path: root/src/chevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chevents.c')
-rw-r--r--src/chevents.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/chevents.c b/src/chevents.c
index f301fd106..13a858acd 100644
--- a/src/chevents.c
+++ b/src/chevents.c
@@ -143,10 +143,8 @@ t_eventid chEvtWait(t_eventmask ewmask,
}
static void wakeup(void *p) {
-#ifdef CH_USE_DEBUG
- if (((Thread *)p)->p_state != PRWTEVENT)
- chDbgPanic("chevents.c, wakeup()");
-#endif
+
+ chDbgAssert(((Thread *)p)->p_state == PRWTEVENT, "chevents.c, wakeup()");
chSchReadyI(p, RDY_TIMEOUT);
}