]>
Commit | Line | Data |
---|---|---|
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 |
28 | pthread_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 | 35 | Compile and link with \fI\-pthread\fP. |
6030f2d8 | 36 | .fi |
d4ac23a7 MK |
37 | .SH DESCRIPTION |
38 | Calling | |
39 | .BR pthread_testcancel () | |
40 | creates a cancellation point within the calling thread, | |
41 | so that a thread that is otherwise executing code that contains | |
42 | no cancellation points will respond to a cancellation request. | |
847e0d88 | 43 | .PP |
d4ac23a7 MK |
44 | If cancelability is disabled (using |
45 | .BR pthread_setcancelstate (3)), | |
46 | or no cancellation request is pending, | |
47 | then a call to | |
274f777f | 48 | .BR pthread_testcancel () |
d4ac23a7 MK |
49 | has no effect. |
50 | .SH RETURN VALUE | |
51 | This function does not return a value. | |
52 | If the calling thread is canceled as a consequence of a call | |
53 | to this function, then the function does not return. | |
54 | .SH ERRORS | |
55 | This function always succeeds. | |
56 | .\" SH VERSIONS | |
57 | .\" Available since glibc 2.0 | |
f0151ef1 | 58 | .SH ATTRIBUTES |
bcb3beab PH |
59 | For an explanation of the terms used in this section, see |
60 | .BR attributes (7). | |
61 | .TS | |
62 | allbox; | |
63 | lbw20 lb lb | |
64 | l l l. | |
65 | Interface Attribute Value | |
66 | T{ | |
f0151ef1 | 67 | .BR pthread_testcancel () |
bcb3beab PH |
68 | T} Thread safety MT-Safe |
69 | .TE | |
d4ac23a7 | 70 | .SH CONFORMING TO |
71871bea | 71 | POSIX.1-2001, POSIX.1-2008. |
d4ac23a7 MK |
72 | .SH EXAMPLE |
73 | See | |
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) |