evl_get_current() contains implementation details which are definitely
not part of the API and the way this works should not be exposed.
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Since ABI 23, the core provides the new observable element, which
enables the observer design pattern. Any EVL thread is in and of
itself an observable which can be monitored for events too.
As a by-product, the poll interface can now be given a user-defined
opaque data when subscribing file descriptors to poll elements, which
the core passes back on return to evl_poll().
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
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>
evl_udelay() was an annoying misnomer for people with kernel
development background, as this relates to a busy wait loop, not to a
sleeping call, which evl_udelay() actually was.
Rename this call to evl_usleep(), converging to the glibc signature
for usleep(3) in the same move.
Returns version information about the running EVL interface including
the API and kernel ABI levels. A negative ABI level denotes the EVL
shim layer (eshi).
Events timed on the monotonic clock is the most common form used by
applications. Allow people to write more compact code by providing
creation calls and static initializers aimed at building these
directly:
- evl_new_event(), EVL_EVENT_INITIALIZER() for events timed on the
monotonic clock.
- evl_new_event_any() and EVL_EVENT_ANY_INITIALIZER() usable for
specifying the clock.
Zero-initialized semaphores timed on the monotonic clock is the
most common form used by applications. Allow people to write more
compact code by providing creation calls and static initializers aimed
at building these directly:
- evl_new_sem(), EVL_SEM_INITIALIZER() for zero-init semaphores
timed on the monotonic clock.
- evl_new_sem_any() and EVL_SEM_ANY_INITIALIZER() usable for any
initialization form, specifying the clock and init value.
Zero-initialized event groups timed on the monotonic clock is the
most common form used by applications. Allow people to write more
compact code by providing creation calls and static initializers aimed
at building these directly:
- evl_new_flags(), EVL_FLAGS_INITIALIZER() for zero-init event groups
timed on the monotonic clock.
- evl_new_flags_any() and EVL_FLAGS_ANY_INITIALIZER() usable for any
initialization form, specifying the clock and init value.
Normal (i.e. non-recursive) mutexes timed on the monotonic clock are
the most common form of locks used by applications. Allow people to
write more compact code by providing creation calls and static
initializers aimed at building these directly:
- evl_new_mutex(), EVL_MUTEX_INITIALIZER() for PI locks timed on the
monotonic clock.
- evl_new_mutex_any() and EVL_MUTEX_ANY_INITIALIZER() for building any
supported type of lock (normal/recursive), specifying the protocol
(PI/PP) and the base clock.
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.