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

Kaspar Schleiser notifications at github.com
Mon Nov 16 10:48:47 CET 2020


> Granted, that _feels_ dirty - and I know why: A thread might wait on multiple mutexen. How can we be sure to cancel the right on?
> Maybe the caller as to supply the pointer to the mutex it wants to cancel?

That's how @maribu did it in this PR:

https://github.com/RIOT-OS/RIOT/pull/15442/files#diff-bb070320207448eaf735fc594635be8523905aac140c757d00d43581d6e2cfcdR225-R242

I agree that your example feels somewhat dirty. :)

Maybe we should change stdio/uart/isr_pipe to use thread flags, so waiting for them can be done at the same time as waiting for other flags, timeouts, msg, events, ... which would allow this to be implemented in a clean way.


-- 
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#issuecomment-727865724
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201116/9b1a5f75/attachment.htm>


More information about the notifications mailing list