1PTHREAD_TESTCANCEL(3)      Linux Programmer's Manual     PTHREAD_TESTCANCEL(3)
2
3
4

NAME

6       pthread_testcancel  -  request  delivery  of  any  pending cancellation
7       request
8

SYNOPSIS

10       #include <pthread.h>
11
12       void pthread_testcancel(void);
13
14       Compile and link with -pthread.
15

DESCRIPTION

17       Calling pthread_testcancel() creates a cancellation  point  within  the
18       calling  thread, so that a thread that is otherwise executing code that
19       contains no cancellation points will respond to a cancellation request.
20
21       If cancelability is disabled (using pthread_setcancelstate(3)),  or  no
22       cancellation  request  is  pending, then a call to pthread_testcancel()
23       has no effect.
24

RETURN VALUE

26       This function does not return a value.  If the calling thread  is  can‐
27       celed  as  a  consequence of a call to this function, then the function
28       does not return.
29

ERRORS

31       This function always succeeds.
32

ATTRIBUTES

34       For  an  explanation  of  the  terms  used   in   this   section,   see
35       attributes(7).
36
37       ┌─────────────────────┬───────────────┬─────────┐
38Interface            Attribute     Value   
39       ├─────────────────────┼───────────────┼─────────┤
40pthread_testcancel() │ Thread safety │ MT-Safe │
41       └─────────────────────┴───────────────┴─────────┘

CONFORMING TO

43       POSIX.1-2001, POSIX.1-2008.
44

EXAMPLE

46       See pthread_cleanup_push(3).
47

SEE ALSO

49       pthread_cancel(3),  pthread_cleanup_push(3), pthread_setcancelstate(3),
50       pthreads(7)
51

COLOPHON

53       This page is part of release 4.16 of the Linux  man-pages  project.   A
54       description  of  the project, information about reporting bugs, and the
55       latest    version    of    this    page,    can     be     found     at
56       https://www.kernel.org/doc/man-pages/.
57
58
59
60Linux                             2017-09-15             PTHREAD_TESTCANCEL(3)
Impressum