Skip to content

Commit 505beb7

Browse files
committed
RTOS: Thread: Fix return value for signal_wait
Signal wait was always returning success even in case of error.
1 parent af1832d commit 505beb7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rtos/Thread.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,10 @@ osEvent Thread::signal_wait(int32_t signals, uint32_t millisec) {
309309
evt.status = (osStatus)osErrorValue;
310310
break;
311311
}
312+
} else {
313+
evt.status = (osStatus)osEventSignal;
314+
evt.value.signals = res;
312315
}
313-
evt.status = (osStatus)osEventSignal;
314-
evt.value.signals = res;
315316

316317
return evt;
317318
}

0 commit comments

Comments
 (0)