diff options
Diffstat (limited to 'os/rt/src/chthreads.c')
-rw-r--r-- | os/rt/src/chthreads.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c index 3f5f35878..ee58694bc 100644 --- a/os/rt/src/chthreads.c +++ b/os/rt/src/chthreads.c @@ -219,7 +219,8 @@ thread_t *chThdCreateStatic(void *wsp, size_t size, #endif
chSysLock();
- chSchWakeupS(tp = chThdCreateI(wsp, size, prio, pf, arg), MSG_OK);
+ tp = chThdCreateI(wsp, size, prio, pf, arg);
+ chSchWakeupS(tp, MSG_OK);
chSysUnlock();
return tp;
@@ -331,7 +332,8 @@ void chThdSleep(systime_t time) { void chThdSleepUntil(systime_t time) {
chSysLock();
- if ((time -= chVTGetSystemTimeX()) > 0) {
+ time -= chVTGetSystemTimeX();
+ if (time > 0U) {
chThdSleepS(time);
}
chSysUnlock();
|