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

Marian Buschsieweke notifications at github.com
Wed Mar 13 16:55:51 CET 2019

> Or am I bikeshedding too much?

No. I think there is no reason to rush this and it is better to get the names and semantics right before merging.

"flag" indicates that it can have the two states "set" and "unset", and setting the flag more than once still results in the "flag-state" set. To me that makes sense to name it like that.

`flag_wake_one()` is maybe a bit confusing, as the one thread receiving the notification is not required to sleep. If the thread is already waiting for the notification and thus sleeping, it is indeed woken up. But if it is not yet awaiting it, it will never sleep at all.

If no one minds long names, maybe `flag_t`, `flag_init()`, `flag_set()`, `flag_await_set_and_clear()` would be good names?

And the implementation should go to `flag.c` and the declaration to `flag.h`?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190313/8cee04f5/attachment-0001.html>

More information about the notifications mailing list