<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Native API</title>
    <link>/api/evl/index.html</link>
    <description>What is an “EVL application process”? An EVL application process is composed of one or more EVL threads, running along with any number of regular POSIX threads.&#xA;an EVL thread is initially a plain regular POSIX thread spawned by a call to pthread_create(3) or the main() context which has issued the evl_attach_self() system call. This service binds the caller to the EVL core, which enables it to invoke the real-time, ultra-low latency services the latter delivers.</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Copyright 2001-2026 The Xenomai project.</copyright>
    <atom:link href="/api/evl/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Function index</title>
      <link>/api/evl/function_index/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/function_index/index.html</guid>
      <description>The content of the Stage switching column indicates the behavior of an EVL thread when calling the service with respect to its execution stage:&#xA;▲ denotes a strict out-of-band call. The caller must be attached to the EVL core. It is unconditionally promoted to the out-of-band execution stage if running in-band at the time of the call.&#xA;▼ denotes a strict in-band call. The caller is unconditionally switched to the in-band execution stage if running out-of-band at the time of the call.</description>
    </item>
    <item>
      <title>Initialization</title>
      <link>/api/evl/init/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/init/index.html</guid>
      <description>Initializing libevl When initializing, the core EVL library undertakes the following steps once for any given application process:&#xA;it sets up the specific bits for the CPU architecture, which boils down to resolving the address of the vDSO for the current process.&#xA;it locks the current and future process memory by a call to mlockall(2), so that we won’t get page faults due to on-demand memory schemes such as the copy-on-write technique.</description>
    </item>
    <item>
      <title>Thread</title>
      <link>/api/evl/thread/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/thread/index.html</guid>
      <description>Thread element The regular in-band thread is the basic execution unit in EVL too, with an out-of-band extension though. The most common kind of EVL threads is a regular POSIX thread started by pthread_create(3) which has attached itself to the EVL core by a call to evl_attach_self(). Once attached, a thread can:&#xA;request real-time services to the core, exclusively by calling routines available from the EVL library. In this case, and only in this one, you get real-time guarantees for the caller. This is what time-critical processing loops are expected to use. Such request may switch the calling thread to the out-of-band execution stage for running under EVL’s supervision in order to ensure real-time behaviour.</description>
    </item>
    <item>
      <title>Mutex</title>
      <link>/api/evl/mutex/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/mutex/index.html</guid>
      <description>Serializing threads with mutexes EVL provides common mutexes for serializing thread access to a shared resource from out-of-band context, with semantics close to the POSIX specification for the basic operations.&#xA;Mutex services evl_create_mutex()Create a mutex, setting its clock, ceiling and type. ▼ in-band evl_new_mutex()Create a private, non-recursive mutex with priority inheritance. ▼ in-band EVL_MUTEX_INITIALIZERInitialize a mutex statically, created on first use. evl_open_mutex()Open an existing mutex by name. ▼ in-band evl_lock_mutex()Lock a mutex, waiting for it as long as needed. ▲ out-of-band evl_timedlock_mutex()Lock a mutex, waiting until a deadline at most. ▲ out-of-band evl_trylock_mutex()Lock a mutex only if it is free. ▲ out-of-band evl_unlock_mutex()Release a mutex. 🟰 no stage switch evl_set_mutex_ceiling()Change the priority ceiling of a mutex. ▼ in-band evl_get_mutex_ceiling()Read the priority ceiling of a mutex. 🟰 no stage switch evl_close_mutex()Close a mutex. ▼ in-band int evl_create_mutex(struct evl_mutex *mutex, int clockfd, unsigned int ceiling, int flags, const char *fmt, ...) #include &lt;evl/mutex.h&gt; ▼ in-band non-EVL threads: yes This call creates a mutex, returning a file descriptor representing the new object upon success. This is the generic call form; for creating a mutex with common pre-defined settings, see evl_new_mutex().</description>
    </item>
    <item>
      <title>Read/write lock</title>
      <link>/api/evl/rwlock/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/rwlock/index.html</guid>
      <description>Serializing threads with read/write locks EVL provides process-local read/write locks for serializing threads accessing a shared resource from out-of-band context, with multiple-reader, single writer semantics. Up to 2^30 threads may take a read-side lock concurrently, which should be, well, enough at the moment.&#xA;The implementation is biased towards writers on acquiring such lock, since a waiting writer shall be granted access before any new reader subsequently joining the wait, even if the lock is owned by some reader at the time of the request. In other words, write-starvation cannot happen as a result of more threads indefinitely joining the pool of current readers. Thread priority is otherwise enforced among waiters for gaining access to a free lock.</description>
    </item>
    <item>
      <title>Event</title>
      <link>/api/evl/event/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/event/index.html</guid>
      <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>
    </item>
    <item>
      <title>Flags</title>
      <link>/api/evl/flags/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/flags/index.html</guid>
      <description>Synchronizing on a group of flags An event flag group is an efficient and lightweight mechanism for synchronizing multiple threads, based on a 32bit value, in which each individual bit represents the state of a particular event defined by the application. Therefore, each group defines 32 individual events, from bit #0 to bit #31. Threads can wait for some bits among an arbitrary set to be posted to the flag group (aka disjunctive wait mode), or for an exact set instead (aka conjunctive wait mode).</description>
    </item>
    <item>
      <title>Semaphore</title>
      <link>/api/evl/semaphore/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/semaphore/index.html</guid>
      <description>Synchronizing on a semaphore EVL implements the classic Dijkstra semaphore construct, with an API close to the POSIX specification for the basic operations.&#xA;Semaphore services evl_create_sem()Create a semaphore, setting its clock, initial count and visibility. ▼ in-band evl_new_sem()Create a private, zero-initialized semaphore. ▼ in-band EVL_SEM_INITIALIZERInitialize a semaphore statically, created on first use. evl_flush_sem()Wake up all waiters of a semaphore. 🟰 no stage switch evl_open_sem()Open an existing semaphore by name. ▼ in-band evl_get_sem()Decrement a semaphore, waiting as long as needed. ▲ out-of-band evl_timedget_sem()Decrement a semaphore, waiting until a deadline at most. ▲ out-of-band evl_put_sem()Increment a semaphore. 🟰 no stage switch evl_tryget_sem()Decrement a semaphore only if its count stays positive. 🟰 no stage switch evl_peek_sem()Read the count of a semaphore. 🟰 no stage switch evl_close_sem()Close a semaphore. ▼ in-band int evl_create_sem(struct evl_sem *sem, int clockfd, init initval, int flags, const char *fmt, ...) #include &lt;evl/sem.h&gt; ▼ in-band non-EVL threads: yes This call creates a semaphore, returning a file descriptor representing the new object upon success. This is the generic call form; for creating a semaphore with common pre-defined settings, see evl_new_sem().</description>
    </item>
    <item>
      <title>Clocks</title>
      <link>/api/evl/clock/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/clock/index.html</guid>
      <description>Clock element The target platform can provide particular clock chips and/or clock source drivers in addition to the architecture-specific ones. For instance, some device on a PCI bus could provide a timer which the application wants to use for timing its threads, in addition to the architected timer found on ARM64 and some ARM-based SoCs. The timer hardware would be accessed through the EVL core via a dedicated kernel driver.</description>
    </item>
    <item>
      <title>timerfd</title>
      <link>/api/evl/timer/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/timer/index.html</guid>
      <description>Running oneshot or periodic timers Applications may likely need to run timed loops waiting for high-precision clock events, either once or according to a recurring period. The EVL core gives them timers for this purpose, which can be obtained on any existing EVL clock. EVL timers support synchronous delivery, there is no asynchronous notification mechanism of clock events. This means that a client thread must explicitly wait for the next expiry by either reading or polling for such event. Would the application choose to poll for clock events on a timer, it would still have to collect these events once they have occurred by reading the timer file descriptor.</description>
    </item>
    <item>
      <title>Observable</title>
      <link>/api/evl/observable/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/observable/index.html</guid>
      <description>Using the observer pattern for event-driven applications The EVL core provides a simple yet flexible support for implementing the observer design pattern in your application, based on the Observable element. The Observable receives a stream of so-called notices, which may be events, state changes or any data which fits within a 64bit word, delivering them as notifications (with additional meta-data) to subscribed threads called observers, when they ask for it. Subscribers do not have to be attached to the EVL core, any thread can observe an Observable element. Whether the threads which produce the events, the Observable and the observers live in the same or different processes is transparent.</description>
    </item>
    <item>
      <title>Message queue</title>
      <link>/api/evl/mq/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/mq/index.html</guid>
      <description>Passing messages through a queue An EVL message queue carries messages of a fixed maximum size, from any number of senders to any number of receivers, in the same process or across processes. Its semantics are close to the POSIX message queues:&#xA;each message has a priority, from 0 to EVL_MQ_PRIO_MAX - 1 (63). A receiver gets the oldest message of the highest priority first.</description>
    </item>
    <item>
      <title>Cross-buffer</title>
      <link>/api/evl/xbuf/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/xbuf/index.html</guid>
      <description>Bi-directional out-of-band ⇔ in-band messaging A most typical requirement in dual kernel systems is to exchange data between threads running in separate execution stages, i.e. out-of-band vs in-band, without incuring any delay for the out-of-band side. The EVL core implements a feature called a cross-buffer (aka xbuf), which connects the sending out-of-band end of a communication channel to its receiving in-band end, and conversely. As a result, data sent to a cross-buffer by calling oob_write() are received by calling read(2), data sent by calling write(2) are received by calling oob_read(). A cross-buffer can be used for transferring fixed-size or variable-size data, supports message-based and byte-oriented streams. For instance, such a mechanism would enable a GUI front-end to receive monitoring data from a real-time work loop.</description>
    </item>
    <item>
      <title>Ring</title>
      <link>/api/evl/ring/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/ring/index.html</guid>
      <description>Lock-free FIFO rings A ring is a first-in, first-out queue which any number of threads may push to and pull from concurrently, without locks and without system calls. Neither waiting nor stage switching is involved: an operation which cannot proceed, such as pulling from an empty ring, returns at once. The rings implement the scalable circular queue designed by Ruslan Nikolaev (paper).</description>
    </item>
    <item>
      <title>File proxy</title>
      <link>/api/evl/proxy/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/proxy/index.html</guid>
      <description>Zero-latency I/O to in-band files A common issue with dual kernel systems stems from the requirement not to issue in-band system calls while running time-critical code in out-of-band context. Problem is that sometimes, you may need - for instance - to write to regular files such as for logging information to the console or elsewhere from an out-of-band work loop. Doing so by calling common stdio(3) routines directly is therefore not an option for latency reasons.</description>
    </item>
    <item>
      <title>Polling file descriptors</title>
      <link>/api/evl/poll/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/poll/index.html</guid>
      <description>Waiting for events on file descriptors Every EVL element is represented by a device file accessible in the /dev/evl file hierarchy, and requests can be sent to any of those elements by writing to common file descriptors obtained on the corresponding files. Conversely, information is returned to the caller by reading from those file descriptors. EVL applications can poll for out-of-band events occurring on a set of file descriptors opened on elements, just like in-band applications can use poll(2) with other files.</description>
    </item>
    <item>
      <title>Networking</title>
      <link>/api/evl/net/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/net/index.html</guid>
      <description>Using out-of-band enabled sockets The EVL network stack in kernel space communicates with applications running in user-space via the common socket service access point. Passing the SOCK_OOB flag to the socket(2) system call enables out-of-band services for the new socket, provided the EVL network stack implements such support for the address and protocol family specified in the socket creation call. Currently, EVL implements AF_INET,SOCK_DGRAM (i.e. IPv4 UDP protocol) and AF_PACKET,SOCK_RAW (raw ethernet packet). Custom protocols can be implemented in the out-of-band network stack.</description>
    </item>
    <item>
      <title>Out-of-band I/O services</title>
      <link>/api/evl/io/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/io/index.html</guid>
      <description>Communicating with real-time capable device drivers Using the EVL kernel API, you can extend an existing driver for supporting out-of-band I/O operations, or even write one from scratch. Both character-based I/O and socket protocol drivers are supported.&#xA;On the user side, application can exchange data with, send requests to these real-time capable drivers from the out-of-band execution stage with the a couple of additional services libevl provides.</description>
    </item>
    <item>
      <title>Scheduling</title>
      <link>/api/evl/scheduling/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/scheduling/index.html</guid>
      <description>The out-of-band scheduler EVL defines five scheduling policies for running out-of-band threads. These policies are hierarchized: every time the core needs to pick the next eligible thread to run on the current CPU, it queries each policy module for a runnable thread in the following order:&#xA;SCHED_FIFO, which is the common first-in, first-out real-time policy.&#xA;SCHED_RR round-robin policy internally.</description>
    </item>
    <item>
      <title>Memory heap</title>
      <link>/api/evl/heap/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/heap/index.html</guid>
      <description>Dynamic memory allocation from out-of-band context EVL applications usually have to manage the RAM resource dynamically, so that the number of live objects they may need to maintain, and for how long they would have to do so, does not have to be defined or even known in advance. For this purpose, libevl implements a memory heap manager usable from the out-of-band context, from which objects can be allocated or released dynamically in a time-bound fashion.</description>
    </item>
    <item>
      <title>Kernel tracing</title>
      <link>/api/evl/tracing/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/tracing/index.html</guid>
      <description>Writing to the kernel trace An application may write messages to the trace of the kernel tracer, so that they appear among the kernel events, in the order of their occurrence. It may also freeze the trace when it detects an issue, such as a missed deadline, so that the events leading to it can be studied later. Both operations work from either stage, so an out-of-band thread does not switch stage for this.</description>
    </item>
    <item>
      <title>Miscellanea</title>
      <link>/api/evl/misc/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/misc/index.html</guid>
      <description>A set of ancillary services which are not directly related to EVL elements.&#xA;evl_get_version()Read the version of libevl and of the core. 🟰 no stage switch evl_sigdebug_handler()Print the diagnostics carried by SIGDEBUG. struct evl_version evl_get_version(void) #include &lt;evl/sys.h&gt; 🟰 no stage switch non-EVL threads: yes This function returns the available version information about the current libevl API and EVL core.</description>
    </item>
    <item>
      <title>API revisions</title>
      <link>/api/evl/api-revs/index.html</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/api/evl/api-revs/index.html</guid>
      <description>You can obtain the current API revision of libevl either at compilation time using the value of the __EVL__ macro defined in the &lt;evl/evl.h&gt; main header file, or dynamically by calling evl_get_version().&#xA;rev. 38 (libevl r63) Add message queues.&#xA;Add a ring variant carrying integer indices in addition to the existing one carrying pointers.&#xA;A zeroed timeout no longer means an infinite wait in the timed calls, such as evl_timedlock_mutex() or evl_timedpoll(). Every timeout is an absolute date, so a zeroed one is a date in the past, and the call fails with -ETIMEDOUT at once unless it can succeed without waiting. Pass a NULL timeout to wait with no time limit, or use the untimed version of these calls.</description>
    </item>
  </channel>
</rss>