1pthread_testcancel(3) Library Functions Manual pthread_testcancel(3)
2
3
4
6 pthread_testcancel - request delivery of any pending cancelation re‐
7 quest
8
10 POSIX threads library (libpthread, -lpthread)
11
13 #include <pthread.h>
14
15 void pthread_testcancel(void);
16
18 Calling pthread_testcancel() creates a cancelation point within the
19 calling thread, so that a thread that is otherwise executing code that
20 contains no cancelation points will respond to a cancelation request.
21
22 If cancelability is disabled (using pthread_setcancelstate(3)), or no
23 cancelation request is pending, then a call to pthread_testcancel() has
24 no effect.
25
27 This function does not return a value. If the calling thread is can‐
28 celed as a consequence of a call to this function, then the function
29 does not return.
30
32 This function always succeeds.
33
35 For an explanation of the terms used in this section, see at‐
36 tributes(7).
37
38 ┌────────────────────────────────────────────┬───────────────┬─────────┐
39 │Interface │ Attribute │ Value │
40 ├────────────────────────────────────────────┼───────────────┼─────────┤
41 │pthread_testcancel() │ Thread safety │ MT-Safe │
42 └────────────────────────────────────────────┴───────────────┴─────────┘
43
45 POSIX.1-2008.
46
48 glibc 2.0. POSIX.1-2001.
49
51 See pthread_cleanup_push(3).
52
54 pthread_cancel(3), pthread_cleanup_push(3), pthread_setcancelstate(3),
55 pthreads(7)
56
57
58
59Linux man-pages 6.05 2023-07-20 pthread_testcancel(3)