<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Event</title>
    <link>/api/evl/event/index.html</link>
    <description>Synchronizing on arbitrary events An EVL event object has the same semantics than a POSIX condition variable. It can be used for synchronizing EVL threads on the state of some shared information in a raceless way. Proper serialization is enforced by pairing an event with a mutex. The typical usage pattern is as follows:&#xA;#include &lt;evl/mutex.h&gt; #include &lt;evl/event.h&gt; struct evl_mutex lock = EVL_MUTEX_INITIALIZER(&#34;this_lock&#34;, EVL_CLOCK_MONOTONIC, 0, EVL_MUTEX_NORMAL|EVL_CLONE_PRIVATE); struct evl_event event = EVL_EVENT_INITIALIZER(&#34;this_event&#34;, EVL_CLOCK_MONOTONIC, EVL_CLONE_PRIVATE); bool condition = false; void waiter(void) { evl_lock_mutex(&amp;lock); /* * Check whether the wait condition is satisfied, go * sleeping if not. EVL drops the lock and puts the thread * to sleep atomically, then re-acquires it automatically * once the event is signaled before returning to the * caller. */ while (!condition) evl_wait_event(&amp;event, &amp;lock); evl_unlock_mutex(&amp;lock); } void poster(void) { /* * Post the condition and signal the event to the waiter, * all atomically by holding the lock. CAUTION: actual wake * up happens when dropping the lock protecting the event. */ evl_lock_mutex(&amp;lock); condition = true; evl_signal_event(&amp;event); evl_unlock_mutex(&amp;lock); } Of course, the way you would express the condition to be satisfied is fully yours. It could be a simple boolean condition like illustrated, or the combination of multiple tests and/or computations, whatever works.</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Copyright 2001-2026 The Xenomai project.</copyright>
    <atom:link href="/api/evl/event/index.xml" rel="self" type="application/rss+xml" />
  </channel>
</rss>