]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/pthread_testcancel.3
err.3: EXAMPLES: use EXIT_FAILURE rather than 1 as exit status
[thirdparty/man-pages.git] / man3 / pthread_testcancel.3
CommitLineData
d4ac23a7
MK
1.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
2.\" <mtk.manpages@gmail.com>
3.\"
93015253 4.\" %%%LICENSE_START(VERBATIM)
d4ac23a7
MK
5.\" Permission is granted to make and distribute verbatim copies of this
6.\" manual provided the copyright notice and this permission notice are
7.\" preserved on all copies.
8.\"
9.\" Permission is granted to copy and distribute modified versions of this
10.\" manual under the conditions for verbatim copying, provided that the
11.\" entire resulting derived work is distributed under the terms of a
12.\" permission notice identical to this one.
13.\"
14.\" Since the Linux kernel and libraries are constantly changing, this
15.\" manual page may be incorrect or out-of-date. The author(s) assume no
16.\" responsibility for errors or omissions, or for damages resulting from
17.\" the use of the information contained herein. The author(s) may not
18.\" have taken the same level of care in the production of this manual,
19.\" which is licensed free of charge, as they might when working
20.\" professionally.
21.\"
22.\" Formatted or processed versions of this manual, if unaccompanied by
23.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 24.\" %%%LICENSE_END
d4ac23a7 25.\"
4b8c67d9 26.TH PTHREAD_TESTCANCEL 3 2017-09-15 "Linux" "Linux Programmer's Manual"
d4ac23a7
MK
27.SH NAME
28pthread_testcancel \- request delivery of any pending cancellation request
29.SH SYNOPSIS
30.nf
31.B #include <pthread.h>
dbfe9c70 32.PP
d4ac23a7 33.B void pthread_testcancel(void);
68e4db0a 34.PP
d4ac23a7 35Compile and link with \fI\-pthread\fP.
6030f2d8 36.fi
d4ac23a7
MK
37.SH DESCRIPTION
38Calling
39.BR pthread_testcancel ()
40creates a cancellation point within the calling thread,
41so that a thread that is otherwise executing code that contains
42no cancellation points will respond to a cancellation request.
847e0d88 43.PP
d4ac23a7
MK
44If cancelability is disabled (using
45.BR pthread_setcancelstate (3)),
46or no cancellation request is pending,
47then a call to
274f777f 48.BR pthread_testcancel ()
d4ac23a7
MK
49has no effect.
50.SH RETURN VALUE
51This function does not return a value.
52If the calling thread is canceled as a consequence of a call
53to this function, then the function does not return.
54.SH ERRORS
55This function always succeeds.
56.\" SH VERSIONS
57.\" Available since glibc 2.0
f0151ef1 58.SH ATTRIBUTES
bcb3beab
PH
59For an explanation of the terms used in this section, see
60.BR attributes (7).
61.TS
62allbox;
63lbw20 lb lb
64l l l.
65Interface Attribute Value
66T{
f0151ef1 67.BR pthread_testcancel ()
bcb3beab
PH
68T} Thread safety MT-Safe
69.TE
d4ac23a7 70.SH CONFORMING TO
71871bea 71POSIX.1-2001, POSIX.1-2008.
a14af333 72.SH EXAMPLES
d4ac23a7
MK
73See
74.BR pthread_cleanup_push (3).
75.SH SEE ALSO
76.BR pthread_cancel (3),
77.BR pthread_cleanup_push (3),
78.BR pthread_setcancelstate (3),
79.BR pthreads (7)