*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> pthread_setcanceltype (3)              
Title
Content
Arch
Section
 

pthread_setcanceltype(3)

Contents


NAME    [Toc]    [Back]

       pthread_setcanceltype - Sets the current thread's cancelability
 type

SYNOPSIS    [Toc]    [Back]

       #include <pthread.h>

       int pthread_setcanceltype(
               int type,
               int *oldtype );

LIBRARY    [Toc]    [Back]

       DECthreads POSIX 1003.1c Library (libpthread.so)

STANDARDS    [Toc]    [Back]

       Interfaces documented on this reference  page  conform  to
       industry standards as follows:

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

PARAMETERS    [Toc]    [Back]

       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    [Toc]    [Back]

       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,
 cancelability depends on the thread's cancelability
  type. If the thread's cancelability 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 routine calls.


RETURN VALUES    [Toc]    [Back]

       On successful completion, this routine returns the  previous
 cancelability 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_CANCEL_DEFERRED   or
       PTHREAD_CANCEL_ASYNCHRONOUS.

ERRORS    [Toc]    [Back]

       None

SEE ALSO    [Toc]    [Back]

      
      
       Functions:  pthread_cancel(3),  pthread_setcancelstate(3),
       pthread_testcancel(3)

       Manuals: Guide to DECthreads and Programmer's Guide



                                         pthread_setcanceltype(3)
[ Back ]
 Similar pages
Name OS Title
pthread_setspecific Tru64 Sets the thread-specific data value associated with the specified key for the current thread
thread_set_timeout Tru64 General: Sets a timer for the current kernel thread
pthread_setcancelstate IRIX manage cancelability of a thread
pthread_setcancelstate Tru64 Sets the calling thread's cancelability state
acl_set_tag_type Tru64 Sets the tag type in an ACL entry
setmonitor IRIX sets the monitor type
pthread_attr_setscope Tru64 Sets the contention scope attribute of the specified thread attributes object
uugetty Tru64 Sets the terminal type, modes, speed, and line.
pthread_yield OpenBSD yield control of the current thread
thread_exit FreeBSD abandon current thread context
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service