Joachim Wiberg
7b1e0eb551
Relocate most documentation to doc/
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-06-13 23:22:44 +02:00
Joachim Wiberg
f207812854
doc: initial effort to enable doxygen
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-06-13 22:09:44 +02:00
Joachim Wiberg
241313a2bd
tests: refactor signal test
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-06-08 21:29:05 +02:00
Joachim Wiberg
1db9b6eb8e
examples: update .gitignore
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-06-08 20:28:59 +02:00
Joachim Wiberg
362670e149
Fix error handling in example callbacks
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-05-26 23:07:46 +02:00
Joachim Wiberg
18000a8ca0
Update changelogs, remember to bump ABI
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-05-26 23:03:42 +02:00
Joachim Wiberg
edc4db38ce
Bump version for v2.4.0 series, -beta1
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-05-26 22:58:32 +02:00
Joachim Wiberg
3d8ec02267
Update signal example with siginfo
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-05-26 22:56:25 +02:00
Joachim Wiberg
e20d37228d
New siginfo member in uev_t for signal watchers
...
This patch adds support for exporting the signalfd_siginfo struct read
from the signal fd descriptor on signals. This allows watcher callbacks
to, e.g., figure out who sent a signal. See signalfd(2) for details on
struct signalfd_siginfo.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-05-18 09:57:57 +02:00
Joachim Wiberg
bfd8454a92
Merge pull request #24 from oturpe/fedora-fixes
...
Fix to build cleanly on Fedora build system
2021-04-22 15:51:06 +02:00
Joachim Wiberg
ad2e71b2c5
TODO: Update with ref. to issue #20
...
Closes #20
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-04-07 08:50:43 +02:00
Joachim Wiberg
042f1b59bf
examples: update comments
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-17 08:10:52 +01:00
Joachim Wiberg
8f96965d35
examples: add fork + signals + timer example
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-17 08:09:00 +01:00
Joachim Wiberg
53cad7bee2
examples: add timer + signal example
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-16 20:02:24 +01:00
Joachim Wiberg
3b3d6a3802
Update changelogs and bump version for v2.3.2 release
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 13:03:18 +01:00
Joachim Wiberg
f819d658fb
debian: update and relocate .symbols file
...
- Use v2.3.0 as minver, some were added earlier but this file wasn't
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 10:55:08 +01:00
Joachim Wiberg
5851282d1a
debian: add .symbols file
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 10:44:58 +01:00
Joachim Wiberg
deef49f85f
debian: change -dev package priorty to optional, as per policy 4.0.1
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 09:54:29 +01:00
Joachim Wiberg
b4b021b21f
Update changelogs for v2.3.2 release
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 09:37:00 +01:00
Joachim Wiberg
d7fd789378
Makefile: refactor and sync with libite
...
- Create .sha256 checksums for tarballs, in addition to the .md5
- Use debuild to build .deb package, runs lintian as well
- List all resulting build artifacts
- Call release-hook first, to check if tagged
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 09:35:05 +01:00
Joachim Wiberg
b26eea6442
configure: enable tar.gz dist archives, by popular demand
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 09:35:05 +01:00
Joachim Wiberg
6c467cd594
debian: sync build-depends from libite
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 09:16:24 +01:00
Joachim Wiberg
86e01be26e
Update copyright years and maintainer surname
...
Signed-off-by: Joachim Wiberg <troglobit@gmail.com >
2021-02-12 09:15:40 +01:00
Joachim Nilsson
5fd29f7241
Clarify documentation of uev_timer_start()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-04-20 15:27:12 +02:00
Joachim Nilsson
8d07cc616e
Update changelogs and bump version for v2.3.1 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-02-22 15:51:16 +01:00
Joachim Nilsson
9db9daec07
Use separate aux/ dir for auxilliary files and check for install
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-02-22 15:48:11 +01:00
Joachim Nilsson
af1a484c46
debian: Update Build-Depends, debhelper >= 10 is sufficient
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-02-22 15:45:08 +01:00
Joachim Nilsson
1e6395a85a
debian: Step library name to match SONAME, fixes lintian warning
...
This patch fixes the lintian warning package-name-doesnt-match-sonames,
which is a reminder to step the library version to match the soname.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-02-22 15:44:36 +01:00
Joachim Nilsson
5c8a258c3f
Update ChangeLog and bump version for v2.3.0 release
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 13:33:06 +02:00
Joachim Nilsson
e79d25bb42
Bump ABI version 2.1.0 --> 2.2.0
...
New eventfd() API added.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 13:30:07 +02:00
Joachim Nilsson
6dccc05e0d
debian: Update copyright to meet recommendations for machine parsing
...
Also, clarify copyright for main sources and debian/* files.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 13:25:03 +02:00
Joachim Nilsson
de95022f44
debian: Update package description and include usr/share files
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 13:24:36 +02:00
Joachim Nilsson
041240a93d
debian: Update to latest std version
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 13:24:13 +02:00
Joachim Nilsson
837d8c1e16
Maintenance and release checklist
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 12:51:44 +02:00
Joachim Nilsson
a334d230a1
Update copyright years
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 12:45:50 +02:00
Joachim Nilsson
2a709f739d
Reverse christmas tree and simplify a bit
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 12:45:29 +02:00
Joachim Nilsson
d4096c8c0c
Simplify ingress, example and origin
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-06 12:23:48 +02:00
Joachim Nilsson
38858488b9
Update ChangeLog with new eventfd support
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-04-05 06:48:43 +02:00
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 >
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 >
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 >
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 >
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
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 >
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
Joachim Nilsson
ed313a1422
Update API documentation, UEV_ERROR and UEV_HUP must be handled
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:56:39 +01:00
Joachim Nilsson
28e735fd81
configure: Add missing --enable-examples option, mentioned in docs
...
The `examples/` directory was never built. The documentation however
indicated the existence of an `--enable-examples` option, which didn't
really exist. This patch adds that option.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:56:39 +01:00
Joachim Nilsson
2bea4192db
Handle UEV_HUP properly in examples and unit tests
...
If an I/O watcher callback fails to read(), returning zero, we check
events for UEV_HUP to detect EOF or socket remote end shutdown().
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:56:39 +01:00
Joachim Nilsson
d52254b4ec
Make sure to restart the I/O watcher on UEV_ERROR
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:17:41 +01:00
Joachim Nilsson
ebb574136b
Make sure to restart I/O watcher when event loop returns error
...
This patch adds UEV_ERROR handling to the test I/O watcher, restarting
the watcher properly. Also, additional error handling to read(), which
was unchecked and failed when fuzzing the libc read() function.
We also take the opportunity to document the reasons for when using the
w->fd (watcher descriptor) and when *not* to in the test. Even to the
author this was confusing and looked suspicious.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:17:41 +01:00
Joachim Nilsson
d7485c59ec
Fix logical error, read before set, found by Valgrind
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:17:41 +01:00
Joachim Nilsson
505a7214a8
tests: Add basic error handling to callbacks, for reference
...
Many users look at both examples *and* unit tests to learn how to use a
library. We should pride ourselves in that we have not just working but
also correct and readable tests.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:17:41 +01:00
Joachim Nilsson
9df7cbfc52
uev_timer_stop(): Check if already stopped to prevent double close()
...
Both cron and regular timers were closed twice on uev_exit(), first
when iterating over all watchers, next after each cb() has run in
uev_run(). This patch adds a check if a watcher is active before
attempting to stop it (again).
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:17:41 +01:00
Joachim Nilsson
6cbeb057b8
uev_timer_init(): Mark fd as uninitialized on error
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:17:41 +01:00
Joachim Nilsson
853604a65a
Reorder switch in same order as enum, +minor whitespace
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:17:37 +01:00
Joachim Nilsson
35a54ef75e
Follow-up to 2f9cce9, handle I/O watchers similar to timer+signal
...
This patch is a follow-up to 2f9cce9 , and a complete refactor of
fe8f3f1 which first introduced the EPOLLERR and EPOLLHUP handling.
Then mainly for managing errors and hangups on stream sockets.
Now, instead of trying to reopen the epoll() fd, and breaking out
hard from the event loop on catastrophic error, we now delegate
I/O watcher EPOLLERR and EPOLLHUP to the watcher callback, just
like other watchers.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-14 12:16:23 +01:00
Joachim Nilsson
966f29c207
Refactor, multiple if() statements into a switch()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-13 17:01:55 +01:00
Joachim Nilsson
6bc1b88973
Refactor, main event loop cleanup and simplification
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-13 15:38:40 +01:00