mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12383 from evedon/fix-thread_sleep_for-zero
Fix thread_sleep_for with zero wake_delaypull/12405/head
commit
67772887ca
|
@ -231,7 +231,9 @@ void do_timed_sleep_relative_or_forever(uint32_t wake_delay, bool (*wake_predica
|
||||||
{
|
{
|
||||||
// Special-case 0 delay, to save multiple callers having to do it. Just call the predicate once.
|
// Special-case 0 delay, to save multiple callers having to do it. Just call the predicate once.
|
||||||
if (wake_delay == 0) {
|
if (wake_delay == 0) {
|
||||||
wake_predicate(wake_predicate_handle);
|
if (wake_predicate) {
|
||||||
|
wake_predicate(wake_predicate_handle);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue