diff --git a/furi/core/semaphore.c b/furi/core/semaphore.c index d05b9bf09..513c3a122 100644 --- a/furi/core/semaphore.c +++ b/furi/core/semaphore.c @@ -104,6 +104,8 @@ FuriStatus furi_semaphore_release(FuriSemaphore* instance) { stat = FuriStatusOk; + FURI_CRITICAL_ENTER(); + if(FURI_IS_IRQ_MODE()) { yield = pdFALSE; @@ -123,6 +125,8 @@ FuriStatus furi_semaphore_release(FuriSemaphore* instance) { furi_event_loop_link_notify(&instance->event_loop_link, FuriEventLoopEventIn); } + FURI_CRITICAL_EXIT(); + return stat; }