aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/interposing_table.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2015-03-29 19:14:41 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2015-03-29 19:14:41 +0000
commitb072e86d0917ad6e699a6770c44130f7685b4605 (patch)
treef2378370e64064c1b5148b3b1f49d982f313b08b /lib/libc/sys/interposing_table.c
parentfd78c994f597a9f26dedba0ebaf7598879e31c89 (diff)
downloadsrc-b072e86d0917ad6e699a6770c44130f7685b4605.tar.gz
src-b072e86d0917ad6e699a6770c44130f7685b4605.zip
Make kevent(2) a cancellation point.
Note that to cancel blocked kevent(2) call, changelist must be empty, since we cannot cancel a call which already made changes to the process state. And in reverse, call which only makes changes to the kqueue state, without waiting for an event, is not cancellable. This makes a natural usage model to migrate kqueue loop to support cancellation, where existing single kevent(2) call must be split into two: first uncancellable update of kqueue, then cancellable wait for events. Note that this is ABI-incompatible change, but it is believed that there is no cancel-safe code that relies on kevent(2) not being a cancellation point. Option to preserve the ABI would be to keep kevent(2) as is, but add new call with flags to specify cancellation behaviour, which only value seems to add complications. Suggested and reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=280818
Diffstat (limited to 'lib/libc/sys/interposing_table.c')
-rw-r--r--lib/libc/sys/interposing_table.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/sys/interposing_table.c b/lib/libc/sys/interposing_table.c
index 0fd6c75ce99c..4290bc65e54c 100644
--- a/lib/libc/sys/interposing_table.c
+++ b/lib/libc/sys/interposing_table.c
@@ -75,6 +75,7 @@ interpos_func_t __libc_interposing[INTERPOS_MAX] = {
SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub),
SLOT(spinlock, __libc_spinlock_stub),
SLOT(spinunlock, __libc_spinunlock_stub),
+ SLOT(kevent, __sys_kevent),
};
#undef SLOT