Releases: troglobit/pev
Releases · troglobit/pev
pev v2.0
News: breaking ABI change, timer callbacks are now passed the timer
id as the first argument instead of the timeout value.
Changes
- Timer callbacks are now passed the timer id as their first argument,
instead of the timeout value. This to allow callbacks an easy way
to callpev_timer_set()
- Add optional destructor callback for private socket, signal, and
timer data, by Jacques de Laval, Westermo
Fixes
- The first argument to
select()
can now handle users calling
pev_sock_del()
. May fix issues seen in this use-case
pev v1.8
Fixes
- Fix spurious timer triggers on Aarch6 (Arm64), or any arch where a
char
is default unsigned. Found and fixed by Tobias Waldekranz
pev v1.7
Fixes
- Fix problem with timers expiring with old timeout when having called
pev_timer_set()
to reset them - Update timer API description, timeout and period are in microseconds
pev v1.6
Changes
- Add support for resetting one-shot timers
- Simplify signal handling, no implicit masking
pev v1.5
Support for one-shot timers, causes incompatible API change.
Changes
- Add support for one-shot timers. Such callbacks will get the
timeout value as their first argument. For periodic tasks this
means, apart from the API change, that the first callback will
get the timeout value, not the period time, unless the timeout
value is zero, or the values are equal
Fixes
- Check return value from
fcntl()
, which is responsible for
ensuring all file descriptors are in non-blocking state. As well
as theO_CLOEXEC
flag to prevent forked children from modifying
the descriptors of the parent process. On failure,pev_sock_add()
now returns error, which must be dealt with - Safely iterate over all events, callbacks may add or remove events
- Fix install target, looked for missing file LICENSE
pev v1.4
pev v1.3
Bug fix release, including incompatible API change
- Timer resolution has changed from seconds to microseconds, affects
period
argument inpev_timer_add()
- Linked list fix, regression introduced in v1.2, removing an event at runtime caused loss more events: A B C D E, removing B caused loss of A as well, only: C D E remain
- Sanity check API input arguments, returns
EINVAL
if arguments are not OK, e.g. NULL callbacks, invalid signal numbers, or bad sockets - Memory safety fixes: uninitialized timers, checking for socket activity on non-sockets, etc.
- Free memory properly on
pev_exit()
pev v1.2
pev v1.1
Minor fixes
- Fix leaking for local variable
running
- Fix build on macOS, does not have
SOCK_CLOEXEC
- Handle
EINTR
when reading (signal/timer) from event pipe - Use BSD semantics for signals, restart syscalls automatically
- Support Illumos/OpenSolaris, simplify default
Makefile
- You now may need to set
CC
andprefix
environment variables to build and install, respectively
- You now may need to set
- Support *BSD
- Verified on OpenBSD, FreeBSD, and NetBSD