Commit Graph

8 Commits

Author SHA1 Message Date
Philippe Gerum 9b42b85ed8 lib: introduce element visibility attribute
Since core ABI 21, users can decide whether a new element should be
made public or private depending on the value of clone flags added to
the new long form of all element creation calls, i.e. evl_create_*().
All evl_new_*() calls become a shorthand for their respective long
form with reasonable default arguments, including private visibility.

As a shorthand, libevl also interprets a slash character leading the
name argument passed to these services as an implicit request for
creating a public element. In other words, this is the same as passing
EVL_CLONE_PUBLIC in the clone flags.

A public element appears as a cdev in the /dev/evl hierarchy, which
means that it is visible to other processes, which may share it. On
the contrary, a private element is only known from the process
creating it, although it does appear in the /sysfs hierarchy
regardless.

e.g.:

efd = evl_attach_self("/visible-thread");

total 0
crw-rw----    1 root     root      248,   1 Apr 17 11:59 clone
crw-rw----    1 root     root      246,   0 Apr 17 11:59 visible-thread

or,

efd = evl_attach_self("private-thread");

total 0
crw-rw----    1 root     root      248,   1 Apr 17 11:59 clone

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2020-04-18 20:43:02 +02:00
Philippe Gerum 92883647a6 tests: tame down useless verbosity 2019-10-31 13:55:40 +01:00
Philippe Gerum 438dcd1363 tests: use errno-based assertion as appropriate 2019-07-12 17:27:30 +02:00
Philippe Gerum afe4355952 tests/helpers: fix assertion in new_thread() 2019-05-28 19:43:42 +02:00
Jorge Ramirez-Ortiz bad49d4470 lib, tests: access kernel elements and utilities via UAPI 2019-03-28 13:57:17 +01:00
Philippe Gerum eda7791f9b evl: rename evenless/ paths to evl/ 2019-03-10 16:25:02 +01:00
Philippe Gerum 4d5ca502ca tests: basic-xbuf: use helper module 2019-03-04 17:49:06 +01:00
Philippe Gerum 240f0babe1 evenless: nothing more
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
2019-03-04 17:49:06 +01:00