[riot-devel] Condition Variables
brummer.simon at googlemail.com
Thu Aug 18 19:26:17 CEST 2016
The hole message passing avoidance is actually a pretty good point. I
prefer message passing because I can handle the hole User Function call
Timeout Handling with it as well. It would be interesting if a condition
change could occur based on the expiration of a Timer.
Just my thoughts on that.
Am 18.08.2016 6:42 nachm. schrieb "Sam Kumar" <samkumar99 at gmail.com>:
Thanks for the advice, Simon, Martin, and Kaspar!
For now, I'll use a mutex together with thread_flags. Using message
passing, as Simon suggested, would work for me as well; the reason I find
thread_flags preferable is that I need to block application threads that
call send() and receive(), that may already be using message passing.
If people don't mind, and they think it would be useful, I'm also willing
to contribute a lightweight condition variable to the core module. I think
it could be implemented simply as a queue, just like the current mutex
On Wed, Aug 17, 2016 at 10:19 AM, Kaspar Schleiser <kaspar at schleiser.de>
> On 08/16/2016 09:49 PM, Sam Kumar wrote:
> > If not, I want to learn if there is another structured way to
> > block a thread until an event, that I should use instead.
> maybe thread_flags work for your use-case.
> devel mailing list
> devel at riot-os.org
devel mailing list
devel at riot-os.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel