f_pthread_setcancelstate(state, oldstate)

Purpose

This function can be used to set the thread's cancelability state. The new state will be set according to the argument state. The old state will be returned in the argument oldstate.

Class

Function

Argument Type and Attributes

state
INTEGER(4), INTENT(IN)

Must contain one of the following:

PTHREAD_CANCEL_DISABLE:
the thread's cancelability is disabled.

PTHREAD_CANCEL_ENABLE:
the thread's cancelability is enabled.

oldstate
INTEGER(4), INTENT(OUT)

On return from this function, oldstate will contain one of the following values:

PTHREAD_CANCEL_DISABLE:
the thread's cancelability is disabled.

PTHREAD_CANCEL_ENABLE:
the thread's cancelability is enabled.

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 state is invalid.
IBM Copyright 2003