Purpose
This function can be used to set the thread's cancelability
type. The new type will be set according to the argument
type. The old type will be returned in argument
oldtype.
Class
Function
Argument Type and Attributes
- type
- INTEGER(4), INTENT(IN)
Must contain one of the following values:
- PTHREAD_CANCEL_DEFERRED:
- cancelation request will be delayed until a cancelation point.
- PTHREAD_CANCEL_ASYNCHRONOUS:
- cancelation request will be acted upon immediately. This may cause
unexpected results.
- oldtype
- INTEGER(4), INTENT(OUT)
On return from this procedure, oldtype will contain one of
the following values:
- PTHREAD_CANCEL_DEFERRED:
- cancelation request will be delayed until a cancelation point.
- PTHREAD_CANCEL_ASYNCHRONOUS:
- cancelation request will be acted upon immediately. This may cause
unexpected results.
Result Type and Attributes
INTEGER(4)
Result Value
On successful completion, this function returns 0. Otherwise,
this function returns the following error.
- EINVAL
- The argument type is invalid.
