OSDN Git Service

(split) LDP: Update original to LDP v3.38.
[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 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .TH PTHREAD_TESTCANCEL 3 2008-11-17 "Linux" "Linux Programmer's Manual"
25 .SH NAME
26 pthread_testcancel \- request delivery of any pending cancellation request
27 .SH SYNOPSIS
28 .nf
29 .B #include <pthread.h>
30
31 .B void pthread_testcancel(void);
32 .sp
33 Compile and link with \fI\-pthread\fP.
34 .fi
35 .SH DESCRIPTION
36 Calling
37 .BR pthread_testcancel ()
38 creates a cancellation point within the calling thread,
39 so that a thread that is otherwise executing code that contains
40 no cancellation points will respond to a cancellation request.
41
42 If cancelability is disabled (using
43 .BR pthread_setcancelstate (3)),
44 or no cancellation request is pending,
45 then a call to
46 .BR pthread_cancel (3)
47 has no effect.
48 .SH RETURN VALUE
49 This function does not return a value.
50 If the calling thread is canceled as a consequence of a call
51 to this function, then the function does not return.
52 .SH ERRORS
53 This function always succeeds.
54 .\" SH VERSIONS
55 .\" Available since glibc 2.0
56 .SH CONFORMING TO
57 POSIX.1-2001.
58 .SH EXAMPLE
59 See
60 .BR pthread_cleanup_push (3).
61 .SH SEE ALSO
62 .BR pthread_cancel (3),
63 .BR pthread_cleanup_push (3),
64 .BR pthread_setcancelstate (3),
65 .BR pthreads (7)