pthread_setcanceltype man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

pthread_setcanceltype(3)			      pthread_setcanceltype(3)

NAME
       pthread_setcanceltype - Sets the current thread's cancelability type

SYNOPSIS
       #include <pthread.h>

       int pthread_setcanceltype(
	       int type,
	       int *oldtype );

LIBRARY
       DECthreads POSIX 1003.1c Library (libpthread.so)

STANDARDS
       Interfaces  documented on this reference page conform to industry stan‐
       dards as follows:

       IEEE Std 1003.1c-1995, POSIX System Application Program Interface

PARAMETERS
       The cancelability type to set for the calling thread. The following are
       valid  values:  PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_ASYNCHRONOUS The
       previous cancelability type.

DESCRIPTION
       This routine sets the cancelability type and returns the previous  type
       in oldtype.

       When  the  cancelability	 state	is set to PTHREAD_CANCEL_DISABLE, (see
       pthread_setcancelstate), a cancel cannot be delivered  to  the  thread,
       even  if	 a  cancelable routine is called or asynchronous cancelability
       type is enabled.

       When the cancelability state is set to PTHREAD_CANCEL_ENABLE,  cancela‐
       bility depends on the thread's cancelability type. If the thread's can‐
       celability type is set to PTHREAD_CANCEL_DEFERRED, the thread can  only
       receive	a  cancel at specific cancellation points (including condition
       waits, thread joins, and calls to pthread_testcancel.)  If the thread's
       cancelability  type  is	PTHREAD_CANCEL_ASYNCHRONOUS, the thread can be
       canceled at any point in its execution.

       When  a	thread	is  created,  the  default   cancelability   type   is
       PTHREAD_CANCEL_DEFERRED.

       Warning	If the asynchronous cancelability type is set, do not call any
       routine unless it is explicitly documented as safe to  be  called  with
       the asynchronous cancelability type. Note that none of the general run-
       time libraries and none of the DECthreads libraries are safe except for
       pthread_setcanceltype, pthread_setcancelstate, and cma_alert_restore.

       The asynchronous cancelability type should only be used when you have a
       compute-bound section of code that carries no state and makes  no  rou‐
       tine calls.

RETURN VALUES
       On successful completion, this routine returns the previous cancelabil‐
       ity type in oldtype.

       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	 type  is   not	  PTHREAD_CAN‐
       CEL_DEFERRED or PTHREAD_CANCEL_ASYNCHRONOUS.

ERRORS
       None

SEE ALSO
       Functions:  pthread_cancel(3), pthread_setcancelstate(3), pthread_test‐
       cancel(3)

       Manuals: Guide to DECthreads and Programmer's Guide

						      pthread_setcanceltype(3)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net