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

Kaspar Schleiser notifications at github.com
Wed Feb 13 12:51:46 CET 2019

> Should I implement it as sketched above, so that we can compare the two approaches?

no, using mutexes plus irq_disable/restore for locking a state will definitely be less efficient.

I think I messed up the logic, the unlock shouldn't even be necessary:

typedef mutex_t thread_signal_t;
thread_signal_init(thread_signal_t *signal) {
thread_signal(thread_signal_t *signal) {
thread_signal_await(thread_signal_t *signal) {

The semantics are "thread_await_signal(signal) only returns if signal has been set at least once since the last call".

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/20190213/8a30c1a2/attachment-0001.html>

More information about the notifications mailing list