SYNOPSIS
#include <pthread.h>
int pthread_setcancelstate(int state, int *oldstate);
DESCRIPTION
The
- PTHREAD_CANCEL_DISABLE
-
Cancellation requests are held pending until cancellation is enabled for the thread.
- PTHREAD_CANCEL_ENABLE
-
Cancellation requests are acted on according to the cancellation type setting for the thread.
The default cancellation state is PTHREAD_CANCEL_ENABLE.
Refer to
PARAMETERS
- state
-
Is the new cancellation state for the calling thread; one of the values specified in the DESCRIPTION section.
- oldstate
-
Points to a location where the current cancellation state for the calling thread is returned. This parameter may be NULL if the current state is not required.
RETURN VALUES
On success,
- EINVAL
-
state is not a valid thread cancellation state setting.
- EFAULT
-
oldstate is an invalid pointer.
CONFORMANCE
POSIX P1003.1 (1996)
MULTITHREAD SAFETY LEVEL
MT-safe, async-cancel-safe
PORTING ISSUES
Normal.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
pthread_cancel() ,pthread_setcanceltype()
PTC MKS Toolkit 10.4 Documentation Build 39.