PTHREAD_TESTCANCEL(3P) SysV PTHREAD_TESTCANCEL(3P)
NAME
pthread_testcancel - Creates a cancellation point in the calling thread
SYNOPSIS
#include <pthread.h>
void pthread_testcancel (void);
DESCRIPTION
The pthread_testcancel function creates a cancellation point in the
calling thread. A cancellation point is a place where it is permissible
for the thread to be canceled. A common place for a cancellation point
is right before an operation that may block or before or after a long
critical section.
If general cancelability is disabled, cancellation points, including
pthread_testcancel, are ignored.
Before any cancellation point, you should always set up a cleanup handler
that will restore invariants if the thread is canceled at that point, if
necessary.
NOTES
This interface is based on draft 4 of the IEEE P1003.4a standard, and
will be changed to conform to the final version.
SEE ALSO
pthread_cancel(3P)