OSDN Git Service

583b4a5b2dfcf6f5bbde0567fae4aa9fcd7edefb
[linuxjm/LDP_man-pages.git] / original / man3 / pthread_testcancel.3
1 .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
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.
24 .\" %%%LICENSE_END
25 .\"
26 .TH PTHREAD_TESTCANCEL 3 2012-04-14 "Linux" "Linux Programmer's Manual"
27 .SH NAME
28 pthread_testcancel \- request delivery of any pending cancellation request
29 .SH SYNOPSIS
30 .nf
31 .B #include <pthread.h>
32
33 .B void pthread_testcancel(void);
34 .sp
35 Compile and link with \fI\-pthread\fP.
36 .fi
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.
43
44 If cancelability is disabled (using
45 .BR pthread_setcancelstate (3)),
46 or no cancellation request is pending,
47 then a call to
48 .BR pthread_testcancel ()
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
58 .SH CONFORMING TO
59 POSIX.1-2001.
60 .SH EXAMPLE
61 See
62 .BR pthread_cleanup_push (3).
63 .SH SEE ALSO
64 .BR pthread_cancel (3),
65 .BR pthread_cleanup_push (3),
66 .BR pthread_setcancelstate (3),
67 .BR pthreads (7)
68 .SH COLOPHON
69 This page is part of release 3.64 of the Linux
70 .I man-pages
71 project.
72 A description of the project,
73 and information about reporting bugs,
74 can be found at
75 \%http://www.kernel.org/doc/man\-pages/.