Debian Codegraph @

upstream/debian-unstable/man3/pthread_testcancel.3

raw
1 '\" t
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH pthread_testcancel 3 2025-05-17 "Linux man-pages 6.18"
7 .SH NAME
8 pthread_testcancel \- request delivery of any pending cancelation request
9 .SH LIBRARY
10 POSIX threads library
11 .RI ( libpthread ,\~ \-lpthread )
12 .SH SYNOPSIS
13 .nf
14 .B #include <pthread.h>
15 .P
16 .B void pthread_testcancel(void);
17 .fi
18 .SH DESCRIPTION
19 Calling
20 .BR pthread_testcancel ()
21 creates a cancelation point within the calling thread,
22 so that a thread that is otherwise executing code that contains
23 no cancelation points will respond to a cancelation request.
24 .P
25 If cancelability is disabled (using
26 .BR pthread_setcancelstate (3)),
27 or no cancelation request is pending,
28 then a call to
29 .BR pthread_testcancel ()
30 has no effect.
31 .SH RETURN VALUE
32 This function does not return a value.
33 If the calling thread is canceled as a consequence of a call
34 to this function, then the function does not return.
35 .SH ERRORS
36 This function always succeeds.
37 .SH ATTRIBUTES
38 For an explanation of the terms used in this section, see
39 .BR attributes (7).
40 .TS
41 allbox;
42 lbx lb lb
43 l l l.
44 Interface Attribute Value
45 T{
46 .na
47 .nh
48 .BR pthread_testcancel ()
49 T} Thread safety MT-Safe
50 .TE
51 .SH STANDARDS
52 POSIX.1-2008.
53 .SH HISTORY
54 glibc 2.0.
55 POSIX.1-2001.
56 .SH EXAMPLES
57 See
58 .BR pthread_cleanup_push (3).
59 .SH SEE ALSO
60 .BR pthread_cancel (3),
61 .BR pthread_cleanup_push (3),
62 .BR pthread_setcancelstate (3),
63 .BR pthreads (7)