Commit Graph
403 Commits
Author SHA1 Message Date
Joachim Nilsson 90048e5996 Add support for generic events using Linux eventfd
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-10-08 07:15:40 +02:00
Joachim Nilsson fd89af6ca1 Minor, fix old copy-paste error in comment
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-10-08 07:14:54 +02:00
Joachim Nilsson 399d75a05c Bump version for new release cycle
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-10-08 07:14:32 +02:00
Joachim Nilsson 6439a34670 Minor, reorder watchers a bit => same order in all functions
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-10-08 07:13:05 +02:00
Joachim Nilsson fac37512d5 Update ChangeLog and bump version for v2.2.0 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
v2.2.0
2018-10-04 21:06:51 +02:00
Joachim Nilsson 17a765b957 Bump ABI version 2.0.2 --> 2.1.0
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-10-04 21:06:32 +02:00
Joachim Nilsson 6fa88eacb4 Add new API; uev_init1(ctx, maxevents) to cap event cache size
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-10-02 17:49:32 +02:00
Joachim Nilsson 32d3842f8a Fix issue with library not being rebuilt when header files change
Add header files to list of library dependencies.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-10-02 17:48:30 +02:00
Joachim Nilsson 574c463c9a Enforce -std=gnu11, which enables typeof() in GCC 4.8
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-27 19:10:09 +02:00
Joachim Nilsson 2470d5bf88 Bump version for new release cycle, v2.2-beta1
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-25 23:38:53 +02:00
Joachim Nilsson e6b99da0f5 Refactor, replace BSD queue.h LIST_ macros with homegrown version
This patch replaces the BSD doubly linked list implementation with a
simplified homegrown version.  This not only reduces the dependency on
an external "library", but also greatly simplifies licensing and gives
us a clean name space that does not intrude on users who want to use
their own version of queue.h in their application that also includes
the libuEv header file.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-25 23:31:23 +02:00
Joachim Nilsson ebe3888d6f Minor, whitespace fixes
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-25 23:23:43 +02:00
Joachim Nilsson 99ef6eb884 Remove __attribute__ ((unused)), use -Wno-unused-parameter instead
The __attribute__ ((unused)) is useful sometimes to declare variables as
intended to be unused, e.g. in callback functions.  However, they tend
to clutter up the code making hard to read.  We therefore remove all
uses of it and instead set -Wno-unused-parameter.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-25 23:19:02 +02:00
Joachim Nilsson de89b6647d Update ChangeLog and bump ABI + release version for v2.1.3 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
v2.1.3
2018-09-06 22:03:16 +02:00
Joachim Nilsson 7eee63e5eb debian: The bare .so symlink should go in the -dev package [Policy]
Clarify rules: libuev.a and libuev.so are for initial linking.  See
Debian Policy sect. 8.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-06 22:02:56 +02:00
Joachim Nilsson c780b82929 Update ChangeLog for upcoming bug fix release v2.1.3
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-05 17:48:50 +02:00
Joachim Nilsson cccaabfad5 Don't call uev_timer_set() when stopping timer, just close() it
The semantics for timerfd in Linux is to use close() to stop,
so no need for the extra overhead with uev_timer_set().

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-04 21:22:33 +02:00
Joachim Nilsson 6d33c56d0f Return early and OK if signal watcher is already stopped
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-04 07:16:01 +02:00
Joachim Nilsson 6ae98d135c tests: Restart stopped timer before calling uev_exit()
There's an issue with uftpd not exiting properly.  Cannot nail it down
properly but it seems to be related to the stopping of active timers.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-04 07:11:23 +02:00
Joachim Nilsson d3e5900f73 Refactor, use LIST_FOREACH_SAFE() instead of while() in uev_exit()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-01 18:55:22 +02:00
Joachim Nilsson 2ff15101ae New API test to verify uev_exit() terminates properly
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-01 18:54:56 +02:00
Joachim Nilsson 04d9e1c80a Bump version for next bugfix release cycle
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-01 18:50:30 +02:00
Joachim Nilsson 0674fb8db4 Reminder to investigate for next release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-01 18:50:18 +02:00
Joachim Nilsson c4ac2eae5d Update example, use /dev/input/js0, the first joystick
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-05-31 23:37:39 +02:00
Joachim Nilsson 951f959549 Bump version for v2.1.2 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
v2.1.2
2018-02-27 00:08:54 +01:00
Joachim Nilsson a2900279f6 Update ChangeLog for v2.1.2 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-02-27 00:06:26 +01:00
Joachim Nilsson f9c9f24afb debian/: Fix minor packaging issues between base and -dev .debs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-02-27 00:05:45 +01:00
Joachim Nilsson ab05f71bbc Fix #17: Check for existence of AM_PROG_AR macro
This patch facilitates building newer versions of libuEv on systems with
older versions of autoconf and automake.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-02-26 22:30:44 +01:00
Joachim Nilsson 856546f4c7 Refactor, simplify
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-01-28 21:36:47 +01:00
Joachim Nilsson 748ebc998c Minor, whitespace
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-01-28 21:17:43 +01:00
Joachim Nilsson 0e97bfdc5a tests/: Return result of tests, not return value of uev_run()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-01-28 16:32:38 +01:00
Joachim Nilsson cebe66e8a4 Update change logs and bump version for v2.1.1 release
Also bump ABI revision, code change.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
v2.1.1
2018-01-28 14:03:56 +01:00
Joachim Nilsson dd651ae791 Call watcher callback as last action for watcher, may delete itself
A watcher callback may be a timeout callback, or similar, that deletes
itself and the watcher.  So we should not dereference anything in the
watcher after the callback.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-01-28 13:53:10 +01:00
Joachim Nilsson a528405258 Minor, whitespace
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-01-28 13:50:50 +01:00
Joachim Nilsson 70f04c10e1 Merge pull request #13 from tisyang/master
Fix example code of timer usage not alarm in README.md
2017-11-22 02:33:35 +01:00
tisyang e3dca8255d Fix example code of timer usage not alarm in README.md 2017-11-22 09:25:12 +08:00
Joachim Nilsson dbf8c0dae2 Doc: a timer must have a non-zero timeout value to be armed properly
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-19 11:29:19 +01:00
Joachim Nilsson f75b1d5080 debian/changelog: New upstream release, new .deb package
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 17:41:09 +01:00
Joachim Nilsson 7f16876932 Bump version for v2.1.0 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
v2.1.0
2017-11-14 13:47:22 +01:00
Joachim Nilsson d7451cadd7 Update ChangeLog for v2.1.0 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 13:47:00 +01:00
Joachim Nilsson 804218ba44 Travis-CI: Test build with both GCC and Clang (LLVM)
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 13:39:02 +01:00
Joachim Nilsson 4d1875e49c Update, file used by redirect example
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 13:31:47 +01:00
Joachim Nilsson 3b356222cb Travis-CI: Fix missing .sh extension to autogen script
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 13:14:21 +01:00
Joachim Nilsson 9ec5dff692 Travis-CI: Enable examples in both regular and Coverity runs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 13:03:28 +01:00
Joachim Nilsson e35c065d77 uev.c: Stop I/O watcher immediately on EPOLLERR or EPOLLHUP
No need to check fd with fcntl().  On EPOLLERR the descriptor has an
error condition that must bed ACK'ed by the callback.  On EPOLLHUP
we got a hang-up on the remote end, usually a stream or pipe, either
way the callback must ACK this too, regardless.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 12:56:39 +01:00
Joachim Nilsson 7d97b9f04a Bump version for v2.1.0 release cycle, pre-test
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 12:56:39 +01:00
Joachim Nilsson 9499052989 Update ChangeLog for upcoming v2.1.0 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 12:56:39 +01:00
Joachim Nilsson c77cee19e8 Bullet lists should not end with a period
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 12:56:39 +01:00
Joachim Nilsson fbcd200fd5 uev.h: Remind hardcore devs about checking common errors in callback
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 12:56:39 +01:00
Joachim Nilsson 84661a1b12 README: Mention error handling early, and point to API docs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-11-14 12:56:39 +01:00