Query: pthread_setcancelstate
OS: osf1
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
pthread_setcancelstate(3) Library Functions Manual pthread_setcancelstate(3)NAMEpthread_setcancelstate - Sets the calling thread's cancelability state.LIBRARYDECthreads POSIX 1003.1c Library (libpthread.so)SYNOPSIS#include <pthread.h> int pthread_setcancelstate( int state, int *oldstate);STANDARDSInterfaces documented on this reference page conform to industry standards as follows: IEEE Std 1003.1c-1995, POSIX System Application Program InterfacePARAMETERSState of general cancelability to set for the calling thread. The following are valid cancel state values: PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_DISABLE Previous cancelability state for the calling thread.DESCRIPTIONThis routine sets the current thread's cancelability state and returns the calling thread's previous cancelability state in oldstate. When cancelability state is set to PTHREAD_CANCEL_DISABLE, a cancelation request cannot be delivered to the thread, even if a cancelable routine is called or asynchronous cancelability type is enabled. When a thread is created, the default cancelability state is PTHREAD_CANCEL_ENABLE. Possible Problems When Disabling Cancelability The most important use of thread cancelation is to ensure that indefinite wait operations are terminated. For example, a thread that waits on some network connection, which can possibly take days to respond (or might never respond), should be made cancelable. When a thread's cancelability is disabled, no routine in that thread is cancelable. As a result, the user is unable to cancel the opera- tion performed by that thread. When disabling cancelability, be sure that no long waits can occur or that it is necessary for other rea- sons to defer cancelation requests around that particular region of code.RETURN VALUESOn successful completion, this routine returns the calling thread's previous cancelability state in the location specified by the oldstate argument. If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The specified state is not PTHREAD_CANCEL_ENABLE or PTHREAD_CANCEL_DISABLE.ERRORSNoneRELATED INFORMATIONFunctions: pthread_cancel(3), pthread_setcanceltype(3), pthread_testcancel(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_setcancelstate(3)
Related Man Pages |
---|
pthread_setcancelstate(3) - mojave |
pthread_setcancelstate(3t) - hpux |
pthread_setcanceltype(3t) - hpux |
pthread_setcancelstate(3) - osf1 |
pthread_testcancel(3) - osx |
Similar Topics in the Unix Linux Community |
---|
Disabling thread deletion by OP? |
Is there an easy way for a moderator to cancel a duplicate account (other than banning the user)? |
Use of Cartoonsin Cartoons for Geeks |