Set a thread's cancellation type
#include <pthread.h> int pthread_setcanceltype( int type, int* oldtype );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The pthread_setcanceltype() function sets the calling thread's cancellation type to type and returns the previous cancellation type in oldtype.
The cancellation type can have the following values:
The default cancellation state for a thread is PTHREAD_CANCEL_DEFERRED. Note that the standard POSIX and C library calls aren't asynchronous-cancellation safe.
|You can set this attribute (in a non-POSIX way) before creating the thread; for more information, see “QNX extensions,” in the documentation for pthread_create().|
POSIX 1003.1 THR
pthread_cancel(), pthread_setcancelstate(), pthread_testcancel()