pthread_cleanup_push man page on OSF1

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

pthread_cleanup_push(3)				       pthread_cleanup_push(3)

NAME
       pthread_cleanup_push - (Macro) Establishes a cleanup handler routine to
       be executed when the thread exits or is canceled

SYNOPSIS
       #include <pthread.h>

       int pthread_cleanup_push(
	       void (*routine) (void *),
	       void *arg );

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
       Routine	executed  as  the  cleanup  handler.   Argument	 passed to the
       cleanup routine.

DESCRIPTION
       This routine pushes the specified routine  onto	the  calling  thread's
       cleanup	handler	 stack. The cleanup handler routine is popped from the
       stack and 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_pop(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	corre‐
       sponding right brace (}).

RETURN VALUES
       None

SEE ALSO
       Functions:   pthread_cancel(3),	 pthread_cleanup_pop(3),  pthread_cre‐
       ate(3), pthread_exit(3), thread_testcancel(3)

       Manuals: Guide to DECthreads and Programmer's Guide

						       pthread_cleanup_push(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OSF1

List of man pages available for OSF1

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