[riot-notifications] [RIOT-OS/RIOT] core/mutex: Add mutex_cancel (#15442)

Marian Buschsieweke notifications at github.com
Mon Nov 16 16:15:23 CET 2020


@maribu commented on this pull request.



> @@ -131,3 +147,31 @@ void mutex_unlock_and_sleep(mutex_t *mutex)
     irq_restore(irqstate);
     thread_yield_higher();
 }
+
+#if IS_USED(MODULE_CORE_MUTEX_CANCEL)
+void mutex_cancel(mutex_t *mutex, thread_t *thread)
+{
+    unsigned irq_state = irq_disable();
+    if (thread->status >= STATUS_ON_RUNQUEUE) {

Done (slightly different)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15442#discussion_r524342272
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201116/eaa281ae/attachment.htm>


More information about the notifications mailing list