OSDN Git Service

65a0478a65701b78a5a0ab11a7498f4e1bbab22c
[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 .SH DESCRIPTION
35 Calling
36 .BR pthread_testcancel ()
37 creates a cancellation point within the calling thread,
38 so that a thread that is otherwise executing code that contains
39 no cancellation points will respond to a cancellation request.
40
41 If cancelability is disabled (using
42 .BR pthread_setcancelstate (3)),
43 or no cancellation request is pending,
44 then a call to
45 .BR pthread_cancel (3)
46 has no effect.
47 .SH RETURN VALUE
48 This function does not return a value.
49 If the calling thread is canceled as a consequence of a call
50 to this function, then the function does not return.
51 .SH ERRORS
52 This function always succeeds.
53 .\" SH VERSIONS
54 .\" Available since glibc 2.0
55 .SH CONFORMING TO
56 POSIX.1-2001.
57 .SH EXAMPLE
58 See
59 .BR pthread_cleanup_push (3).
60 .SH SEE ALSO
61 .BR pthread_cancel (3),
62 .BR pthread_cleanup_push (3),
63 .BR pthread_setcancelstate (3),
64 .BR pthreads (7)