pthread_cleanup_push man page on Ultrix

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

pthread_cleanup_push(3thr)			    pthread_cleanup_push(3thr)

Name
       pthread_cleanup_push  -	Establishes a cleanup handler that is executed
       when the thread exits or is canceled.

Syntax
       #include <pthread.h>

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

Arguments
       routine Routine executed as the cleanup handler.

       arg     Argument executed with the cleanup routine.

Description
       This routine pushes the specified routine  onto	the  calling  thread's
       cleanup	stack.	The  cleanup routine is popped from the stack and exe‐
       cuted with the arg argument when any of the following actions occur:

	  ·  The thread calls pthread_exit.

	  ·  The thread is canceled.

	  ·  The thread calls  pthread_cleanup_pop  and	 specifies  a  nonzero
	     value for the execute argument.

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

Return Values
       This routine must be used as a statement.

	      If an error is detected, it may  be  indicated  by  sending  the
	      thread a synchronously generated signal.

						    pthread_cleanup_push(3thr)
[top]

List of man pages available for Ultrix

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