OSDN Git Service

LDP: Update original to LDP v3.79
[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 2014-05-19 "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 ATTRIBUTES
59 .SS Multithreading (see pthreads(7))
60 The
61 .BR pthread_testcancel ()
62 function is thread-safe.
63 .SH CONFORMING TO
64 POSIX.1-2001.
65 .SH EXAMPLE
66 See
67 .BR pthread_cleanup_push (3).
68 .SH SEE ALSO
69 .BR pthread_cancel (3),
70 .BR pthread_cleanup_push (3),
71 .BR pthread_setcancelstate (3),
72 .BR pthreads (7)
73 .SH COLOPHON
74 This page is part of release 3.79 of the Linux
75 .I man-pages
76 project.
77 A description of the project,
78 information about reporting bugs,
79 and the latest version of this page,
80 can be found at
81 \%http://www.kernel.org/doc/man\-pages/.