diff options
author | kib <kib@FreeBSD.org> | 2015-03-29 19:14:41 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-03-29 19:14:41 +0000 |
commit | 6531ee3ae59f5ac0b1ead44cc768dbbb4757a521 (patch) | |
tree | f2378370e64064c1b5148b3b1f49d982f313b08b /lib/libc/sys/interposing_table.c | |
parent | eb7a3e863e83a5008845bc3751bc734b7b5928e2 (diff) | |
download | FreeBSD-src-6531ee3ae59f5ac0b1ead44cc768dbbb4757a521.zip FreeBSD-src-6531ee3ae59f5ac0b1ead44cc768dbbb4757a521.tar.gz |
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
Diffstat (limited to 'lib/libc/sys/interposing_table.c')
-rw-r--r-- | lib/libc/sys/interposing_table.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/sys/interposing_table.c b/lib/libc/sys/interposing_table.c index 0fd6c75..4290bc6 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 |