1PTHREAD_TESTCANCEL(3) Linux Programmer's Manual PTHREAD_TESTCANCEL(3)
2
3
4
6 pthread_testcancel - request delivery of any pending cancellation re‐
7 quest
8
10 #include <pthread.h>
11
12 void pthread_testcancel(void);
13
14 Compile and link with -pthread.
15
17 Calling pthread_testcancel() creates a cancellation point within the
18 calling thread, so that a thread that is otherwise executing code that
19 contains no cancellation points will respond to a cancellation request.
20
21 If cancelability is disabled (using pthread_setcancelstate(3)), or no
22 cancellation request is pending, then a call to pthread_testcancel()
23 has no effect.
24
26 This function does not return a value. If the calling thread is can‐
27 celed as a consequence of a call to this function, then the function
28 does not return.
29
31 This function always succeeds.
32
34 For an explanation of the terms used in this section, see at‐
35 tributes(7).
36
37 ┌────────────────────────────────────────────┬───────────────┬─────────┐
38 │Interface │ Attribute │ Value │
39 ├────────────────────────────────────────────┼───────────────┼─────────┤
40 │pthread_testcancel() │ Thread safety │ MT-Safe │
41 └────────────────────────────────────────────┴───────────────┴─────────┘
42
44 POSIX.1-2001, POSIX.1-2008.
45
47 See pthread_cleanup_push(3).
48
50 pthread_cancel(3), pthread_cleanup_push(3), pthread_setcancelstate(3),
51 pthreads(7)
52
54 This page is part of release 5.12 of the Linux man-pages project. A
55 description of the project, information about reporting bugs, and the
56 latest version of this page, can be found at
57 https://www.kernel.org/doc/man-pages/.
58
59
60
61Linux 2021-03-22 PTHREAD_TESTCANCEL(3)