Multithreaded Programming Guide

pthread_testcancel(3T)

Use pthread_testcancel(3T) to establish a cancellation point for a thread.

Prototype:

void pthread_testcancel(void);
#include <pthread.h>

pthread_testcancel(); 

The pthread_testcancel() function is effective when thread cancellation is enabled and in deferred mode. Calling this function while cancellation is disabled has no effect.

Be careful to insert pthread_testcancel() only in sequences where it is safe to cancel a thread. In addition to programmatically establishing cancellation points through the pthread_testcancel() call, the pthreads standard specifies several cancellation points. See "Cancellation Points"for more details.

There is no return value.