2 .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .TH pthread_testcancel 3 (date) "Linux man-pages (unreleased)"
9 pthread_testcancel \- request delivery of any pending cancelation request
12 .RI ( libpthread ", " \-lpthread )
15 .B #include <pthread.h>
17 .B void pthread_testcancel(void);
21 .BR pthread_testcancel ()
22 creates a cancelation point within the calling thread,
23 so that a thread that is otherwise executing code that contains
24 no cancelation points will respond to a cancelation request.
26 If cancelability is disabled (using
27 .BR pthread_setcancelstate (3)),
28 or no cancelation request is pending,
30 .BR pthread_testcancel ()
33 This function does not return a value.
34 If the calling thread is canceled as a consequence of a call
35 to this function, then the function does not return.
37 This function always succeeds.
39 For an explanation of the terms used in this section, see
45 Interface Attribute Value
49 .BR pthread_testcancel ()
50 T} Thread safety MT-Safe
60 .BR pthread_cleanup_push (3).
62 .BR pthread_cancel (3),
63 .BR pthread_cleanup_push (3),
64 .BR pthread_setcancelstate (3),