aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include/libc_private.h
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/include/libc_private.h
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/include/libc_private.h')
-rw-r--r--lib/libc/include/libc_private.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h
index e4bf4a6afd82..ceaa2a34fe78 100644
--- a/lib/libc/include/libc_private.h
+++ b/lib/libc/include/libc_private.h
@@ -221,6 +221,7 @@ enum {
INTERPOS__pthread_mutex_init_calloc_cb,
INTERPOS_spinlock,
INTERPOS_spinunlock,
+ INTERPOS_kevent,
INTERPOS_MAX
};
@@ -293,6 +294,7 @@ void * __sys_freebsd6_mmap(void *, __size_t, int, int, int, int, __off_t);
struct aiocb;
struct fd_set;
struct iovec;
+struct kevent;
struct msghdr;
struct pollfd;
struct rusage;
@@ -315,6 +317,8 @@ int __sys_fsync(int);
__pid_t __sys_fork(void);
int __sys_ftruncate(int, __off_t);
int __sys_gettimeofday(struct timeval *, struct timezone *);
+int __sys_kevent(int, const struct kevent *, int, struct kevent *,
+ int, const struct timespec *);
__off_t __sys_lseek(int, __off_t, int);
void *__sys_mmap(void *, __size_t, int, int, int, __off_t);
int __sys_msync(void *, __size_t, int);