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

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

pthread_cleanup_pop(3)

Contents


NAME    [Toc]    [Back]

       pthread_cleanup_pop  - (Macro) Removes the cleanup handler
       routine from the calling thread's  cleanup  handler  stack
       and optionally executes it

SYNOPSIS    [Toc]    [Back]

       #include <pthread.h>

       int pthread_cleanup_pop(
               int execute );

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]

       Integer that specifies whether the cleanup handler routine
       specified in the matching call to  pthread_cleanup_push(3)
       is  executed.  A  nonzero value causes the cleanup handler
       routine to be executed.

DESCRIPTION    [Toc]    [Back]

       This routine removes the cleanup  handler  routine  established
  by  the  matching  call to pthread_cleanup_push(3)
       from the calling thread's cleanup handler stack, then executes
  it if the value specified in this routine's execute
       argument is nonzero.

       A cleanup handler routine can be used to clean up  from  a
       block of code whether exited by normal completion, cancellation,
 or the raising (or reraising) of an exception. The
       routine  is  popped from the calling thread's cleanup handler
 stack and is executed with the arg argument when  any
       of   the   following   actions  occur:  The  thread  calls
       pthread_cleanup_pop(3) and specifies a nonzero  value  for
       the  execute  argument.  The thread calls pthread_exit(3).
       The thread is canceled.  An exception  is  raised  and  is
       caught  when DECthreads unwinds the calling thread's stack
       to the lexical scope of  the  pthread_cleanup_push(3)  and
       pthread_cleanup_pop(3) pair.

       This  routine  and pthread_cleanup_push(3) are implemented
       as macros and must  appear  as  statements  and  in  pairs
       within  the  same  lexical  scope.  You  can  think of the
       pthread_cleanup_push(3) macro as  expanding  to  a  string
       whose   first   character   is   a   left  brace  ({)  and
       pthread_cleanup_pop(3) as expanding to a string containing
       the corresponding right brace (}).








RETURN VALUES    [Toc]    [Back]

       None

SEE ALSO    [Toc]    [Back]

      
      
       Functions:   pthread_cancel(3),   pthread_cleanup_push(3),
       pthread_create(3), pthread_exit(3)

       Manuals: Guide to DECthreads and Programmer's Guide



                                           pthread_cleanup_pop(3)
[ Back ]
 Similar pages
Name OS Title
pthread_cleanup_push Tru64 (Macro) Establishes a cleanup handler routine to be executed when the thread exits or is canceled
sigreturn Linux return from signal handler and cleanup stack frame
pthread_cleanup_pop FreeBSD call the first cleanup routine
pthread_cleanup_pop OpenBSD call the first cleanup routine
pthread_cleanup_push FreeBSD add a cleanup function for thread exit
pthread_cleanup_push IRIX manage thread cleanup handlers
pthread_cleanup_push OpenBSD add a cleanup function for thread exit
pthread_atfork Tru64 Declares fork handler routines to be called when the calling thread's process forks a child process
openpam_free_data FreeBSD generic cleanup function
cleanup HP-UX HP-UX patch cleanup utility
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service