9b42b85ed8
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> |
||
---|---|---|
.. | ||
Makefile | ||
README.md | ||
clock.c | ||
event.c | ||
flags.c | ||
heap.c | ||
init.c | ||
internal.h | ||
mutex.c | ||
poll.c | ||
proxy.c | ||
sched.c | ||
sem.c | ||
thread.c | ||
timer.c | ||
version.c |
README.md
== PURPOSE of libeshi
The EVL shim library mimics the behavior of the original EVL API based on plain POSIX calls from the native *libc, which does not require the EVL core to be enabled in the host kernel. It is useful when the real-time guarantees delivered by the EVL core are not required for quick prototyping or debugging application code.
== USAGE
To build against the EVL shim library, you need to update a couple of settings from the Makefile building your application as follows (*):
CPPFLAGS/CFLAGS:
- Replace -I$(prefix)/include by -I$(prefix)/include/eshi
LDFLAGS:
- Replace -levl by -leshi
For instance:
(CC) -o app app.c -I
(prefix)/include/eshi -L$(prefix)/lib -leshi -lpthread -lrt
(*) $(prefix) is the installation root of libevl (e.g. /usr/evl).
== LIMITATIONS
This API supports process-local services only. The resources/objects it creates cannot be shared between processes.
The following calls are not supported:
evl_peek_flags evl_peek_sem evl_new_xbuf evl_open_mutex evl_open_event evl_open_flags evl_open_sem
== VARIATION(S)
evl_poll: POLLOUT is always set for evl_flags. Unlike with the native libevl API, this condition cannot be monitored for detecting event consumption by the receiver side, i.e. waiting for the value to be cleared upon a successful call to evl_wait*_flags.