summaryrefslogtreecommitdiffstats
path: root/share/man/man3
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-03-29 19:14:41 +0000
committerkib <kib@FreeBSD.org>2015-03-29 19:14:41 +0000
commit6531ee3ae59f5ac0b1ead44cc768dbbb4757a521 (patch)
treef2378370e64064c1b5148b3b1f49d982f313b08b /share/man/man3
parenteb7a3e863e83a5008845bc3751bc734b7b5928e2 (diff)
downloadFreeBSD-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 'share/man/man3')
-rw-r--r--share/man/man3/pthread_testcancel.311
1 files changed, 10 insertions, 1 deletions
diff --git a/share/man/man3/pthread_testcancel.3 b/share/man/man3/pthread_testcancel.3
index ef6a1c1..a6b27f6 100644
--- a/share/man/man3/pthread_testcancel.3
+++ b/share/man/man3/pthread_testcancel.3
@@ -1,5 +1,5 @@
.\" $FreeBSD$
-.Dd June 11, 2013
+.Dd March 29, 2015
.Dt PTHREAD_TESTCANCEL 3
.Os
.Sh NAME
@@ -107,6 +107,7 @@ functions:
.Fn close ,
.Fn creat ,
.Fn fsync ,
+.Fn kevent ,
.Fn mq_receive ,
.Fn mq_send ,
.Fn mq_timedreceive ,
@@ -147,12 +148,20 @@ functions:
.Fn waitpid ,
.Fn write ,
.Fn writev .
+.Pp
The
.Fn fcntl
function is a cancellation point if
.Fa cmd
is
.Dv F_SETLKW .
+.Pp
+The
+.Fn kevent
+function is a cancellation point if it is potentially blocking,
+i.e. when the
+.Fa nevents
+argument is non-zero.
.Sh RETURN VALUES
If successful, the
.Fn pthread_setcancelstate
OpenPOWER on IntegriCloud