All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Florian Bezdeka <florian.bezdeka@siemens.com>
Cc: "Xenomai" <xenomai@lists.linux.dev>,
	 "Jan Kiszka" <jan.kiszka@siemens.com>
Subject: Re: [EVL] A POSIX interface has landed
Date: Mon, 23 Nov 2026 20:09:38 +0100	[thread overview]
Message-ID: <87y0aj5pql.fsf@xenomai.org> (raw)
In-Reply-To: <DN21BM83I0WK.1YQJIYDJMMIU@siemens.com> (Florian Bezdeka's message of "Sun, 22 Nov 2026 21:50:45 +0100")

Florian Bezdeka <florian.bezdeka@siemens.com> writes:

> Hi Philippe,
>
> On Sun Nov 22, 2026 at 9:31 PM CET, Philippe Gerum wrote:
>>
>> After several iterations, pauses and rewrites, a POSIX-conforming
>> interface is finally available with libevl, alongside the original EVL
>> API. 'libcobalt.so' is generated and installed with its headers
>> side-by-side with 'libevl.so'. We can use any of them or both,
>> separately or combined in a single application. The main goal is to
>> cover what x3's libcobalt provides feature-wise, and even more in some
>> cases. An optional compat mode wraps some v3-specific services when
>> needed. The target spec is a subset of POSIX.1-2024 for evl, although
>> this only meant adding pthread_cond_clockwait(),
>> pthread_mutex_clocklock() and sem_clockwait() so far.
>>
>> libcobalt is not an emulation of POSIX calls on top of the original API,
>> it is a standalone implementation sharing a set of intrinsics with the
>> latter. These low-level intrinsics talk to the evl core, keeping the
>> nitty-gritty details out of the window dressing, i.e. the user-facing
>> APIs.  They are part of libevl.so, and both APIs use them the way they
>> see fit. If you plan to write your own real-time API leveraging the evl
>> core services, go with the intrinsics in libevl, this is their basic
>> purpose.
>>
>> Documentation is not there yet (how odd?!). This said, there is an
>> ongoing work revamping the x4 website in order to introduce this new API
>> and some kind of versioning as well, so everything will land in one go.
>>
>> Crash course: libevl builds the POSIX API by default, you only need to
>> pass -Dcompat=true to meson for enabling the full v3 compat shim. Once
>> installed, use `pkgconfig --libs|--cflags cobalt` to retrieve the build
>> flags for using libcobalt. evl-test runs the POSIX test suite if present
>> along with the test suite of the original API.  That's it (_that_ was
>> short!).
>>
>> The implementation required additional services from the core, so
>> changes went to linux-evl as well. The core stays POSIX-free, but it
>> does provide a couple of new general-purpose services which are
>> convenient for implementing a POSIX API in user-space (e.g. see the new
>> 'depot' element).
>>
>> NOTE: The code stops short of one aspect: it does not provide symbol
>> wrapping like v3 does (using ld's --wrap trick); explicit annotation
>> using __EVL(call), __COBALT(call) or __RT(call) [all aliases] is
>> required at the moment. This is deliberate, this needs more thought
>> because symbol wrapping the way v3 implements it proved to have nasty
>> pitfalls over the years, as it comes with hidden edge cases. I plan to
>> RFC on this in a separate thread.
>
> Is that the only blocker for running the x3 testsuite over x4?
>

To run it mostly unmodified, testbed apart? I believe so.  The POSIX
test scenarios in x3 have been implemented in the x4 test suite using
explicit annotation, and those tests are all green. So far, so good.

> __RT() and __STD() kept me busy so often, I'm wondering if we should
> really implement both of them - if at all - again. 
>
> Shouldn't be __STD() be enough? (You get __RT() by default, but there
> should be a way to call the "hidden" libc services.)
>

The issue with __STD() as the only explicit marker would be that we
would then exclusively rely on symbol wrapping to reach libcobalt
services, which raises some problems. I'll follow up on this in a
separate thread.

-- 
Philippe.

      reply	other threads:[~2026-11-23 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 20:31 [EVL] A POSIX interface has landed Philippe Gerum
2026-11-22 20:50 ` Florian Bezdeka
2026-11-23 19:09   ` Philippe Gerum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y0aj5pql.fsf@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=florian.bezdeka@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=xenomai@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.