Standards / Extensions | C or C++ | Dependencies |
---|---|---|
Single UNIX Specification, version 3 |
both | z/OS V1R7 |
#define _OPEN_THREADS 2
#include <pthread.h>
int pthread_setcancelstate(int state, int *oldstate);
pthread_setcancelstate() controls whether the thread acts on a cancelation request caused by a call to pthread_cancel(). The old state is stored into the location pointed to by oldstate. The cancelability states can be:
If successful, pthread_setcancelstate() returns 0. Upon failure, returns the following EINVAL error code: