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.
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.
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.
At this chance, the API is simplified in the following ways:
- we don't provide pulse-mode semaphores anymore. Those should be
provided by a higher level API as flags for instance (ungated
monitors would support that easily by using the signedness bit of an
event monitor value as such flag).
- threads now always wait by priority order. The rarely used FIFO wait
mode was dropped.
Those changes make the @flags parameter to evl_new_sem() useless,
which allows to remove it from the signature.