summaryrefslogtreecommitdiffstats
path: root/man3/pthread_testcancel.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man3/pthread_testcancel.365
1 files changed, 65 insertions, 0 deletions
diff --git a/man3/pthread_testcancel.3 b/man3/pthread_testcancel.3
new file mode 100644
index 0000000..9188ede
--- /dev/null
+++ b/man3/pthread_testcancel.3
@@ -0,0 +1,65 @@
+'\" t
+.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
+.\" <mtk.manpages@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH pthread_testcancel 3 2023-07-20 "Linux man-pages 6.05.01"
+.SH NAME
+pthread_testcancel \- request delivery of any pending cancelation request
+.SH LIBRARY
+POSIX threads library
+.RI ( libpthread ", " \-lpthread )
+.SH SYNOPSIS
+.nf
+.B #include <pthread.h>
+.PP
+.B void pthread_testcancel(void);
+.fi
+.SH DESCRIPTION
+Calling
+.BR pthread_testcancel ()
+creates a cancelation point within the calling thread,
+so that a thread that is otherwise executing code that contains
+no cancelation points will respond to a cancelation request.
+.PP
+If cancelability is disabled (using
+.BR pthread_setcancelstate (3)),
+or no cancelation request is pending,
+then a call to
+.BR pthread_testcancel ()
+has no effect.
+.SH RETURN VALUE
+This function does not return a value.
+If the calling thread is canceled as a consequence of a call
+to this function, then the function does not return.
+.SH ERRORS
+This function always succeeds.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface Attribute Value
+T{
+.na
+.nh
+.BR pthread_testcancel ()
+T} Thread safety MT-Safe
+.TE
+.sp 1
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
+POSIX.1-2001.
+.SH EXAMPLES
+See
+.BR pthread_cleanup_push (3).
+.SH SEE ALSO
+.BR pthread_cancel (3),
+.BR pthread_cleanup_push (3),
+.BR pthread_setcancelstate (3),
+.BR pthreads (7)