[riot-notifications] [RIOT-OS/RIOT] core: Added thread_signal & thread_await_signal (#11069)

Kaspar Schleiser notifications at github.com
Fri Mar 8 18:35:57 CET 2019


@maribu I'm a little slow convincing myself that adding this API is a good idea. I see two issues:

1. this is basically a convenience wrapper around mutex calls. Why not just use mutex correctly? Why introduce another API? I see we'd be ending up with half the code base just doing manually what this PR does, others would be using this API. 

If "mutex" would be called "lock", would that make using it for this purpose make more sense?

2. "signal" is a little loaded when it comes to threads, as posix has a clear but different understanding. I want to avoid people getting the wrong idea on what "thread_signal()" does.

3. there's already thread_flags(). Doesn't "thread_flag_set(FOO)", "thread_flag_wait_any(FOO)" also behave the same, without the need to allocate the mutex?

-- 
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/11069#issuecomment-471011895
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190308/442a9f90/attachment-0001.html>


More information about the notifications mailing list