kc3-lang/libevent/kqueue.c

Branch :


Log

Author Commit Date CI Message
1759485e 2024-12-20 15:56:10 Improve portability on NetBSD According to GCC documentation, "the various `-std` options disable certain keywords". This change adheres to GCC's recommendation by replacing the `typeof` keyword with its alternative, `__typeof__`.
528fbed1 2024-05-19 17:42:19 kqueue: make changelist and eventlist of kevent share the same array The array used by the changelist of the kevent() can be reused by the eventlist, We should make use of this feature to eliminate the extra overhead of array allocation. https://man.freebsd.org/cgi/man.cgi?kqueue https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/kqueue.2.html https://leaf.dragonflybsd.org/cgi/web-man?command=kqueue&section=2 https://man.netbsd.org/kqueue.2 https://man.openbsd.org/kqueue.2 --------- Signed-off-by: Andy Pan <i@andypan.me>
aef201a9 2024-04-29 13:35:33 Change ident for EVFILT_USER to 0 and add a test (#1582) Conventionally, ident for EVFILT_USER is set to 0 to avoid collision of file descriptors, which is what other renowned networking frameworks like netty(java), mio(rust), gnet(go), swift-nio(swift), etc. do currently. Co-authored-by: Azat Khuzhin <azat@libevent.org>
72e6eff0 2019-10-04 01:26:47 Fix compat with NetBSD >= 10 kevent::udata was switched from intptr_t to void*. Handle both cases with the GCC extension typeof().
2707a4ff 2019-05-10 23:54:14 kqueue: Avoid undefined behaviour. As ploxiln pointed out in pull request 811 the check "newsize < 0" is undefined behaviour (signed int overflow). Follow the advice and check kqop->changes_size instead. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Closes: #813 (cherry-picked)
cf8acae3 2019-05-07 20:53:17 Prevent integer overflow in kq_build_changes_list. On amd64 systems with kqueue (e.g. *BSD systems) an integer overflow could be triggered with an excessively huge amount of events. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
df6f99e5 2016-07-08 09:43:39 Check for Mac OS X 10.4 kqueue bug properly EV_ERROR is a bit in struct kevent::flags. Other bits may be set too. Actually we have osx builds on travis-ci, but it uses osx 10.9.5, and we don't have warnings there, since I guess that there is no OR'ing with previous flag in case of error, while in 10.12 there is OR. Fixes: #377 Fixes: #376 Link: https://crbug.com/626534 Link: https://travis-ci.org/libevent/libevent/jobs/141033429
5602e451 2015-08-25 23:31:07 Assume that ke_udata is an integer type on CloudABI.
193c7de5 2015-08-25 15:32:25 Remove BSD-ism: TIMEVAL_TO_TIMESPEC(). Systems like CloudABI implement kqueue() but do not provide the BSD-specific TIMEVAL_TO_TIMESPEC() macro. Change the code to perform this manually, as it is not hard to do this conversion.
6fd73944 2014-06-07 12:57:02 Handle ENOTCAPABLE from FreeBSD - this is returned if an event in the changelist is for an FD that has been closed.