aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chcond.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/rt/src/chcond.c')
-rw-r--r--os/rt/src/chcond.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/os/rt/src/chcond.c b/os/rt/src/chcond.c
index 94fd8e81c..9ea003c7b 100644
--- a/os/rt/src/chcond.c
+++ b/os/rt/src/chcond.c
@@ -113,8 +113,11 @@ void chCondSignalI(condition_variable_t *cp) {
chDbgCheckClassI();
chDbgCheck(cp != NULL);
- if (queue_notempty(&cp->c_queue))
- chSchReadyI(queue_fifo_remove(&cp->c_queue))->p_u.rdymsg = RDY_OK;
+ if (queue_notempty(&cp->c_queue)) {
+ thread_t *tp = queue_fifo_remove(&cp->c_queue);
+ tp->p_u.rdymsg = RDY_OK;
+ chSchReadyI(tp);
+ }
}
/**