Query: pthread_cleanup_push
OS: osf1
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
pthread_cleanup_push(3) Library Functions Manual pthread_cleanup_push(3)NAMEpthread_cleanup_push - (Macro) Establishes a cleanup handler routine to be executed when the thread exits or is canceled.LIBRARYDECthreads POSIX 1003.1c Library (libpthread.so)SYNOPSIS#include <pthread.h> int pthread_cleanup_push( void (*routine)(void *), void *arg);STANDARDSInterfaces documented on this reference page conform to industry standards as follows: IEEE Std 1003.1c-1995, POSIX System Application Program InterfacePARAMETERSRoutine executed as the cleanup handler. Argument passed to the cleanup routine.DESCRIPTIONThis 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 corresponding right brace (}).RETURN VALUESNoneRELATED INFORMATIONFunctions: pthread_cancel(3), pthread_cleanup_pop(3), pthread_create(3), pthread_exit(3), thread_testcancel(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_cleanup_push(3)
Related Man Pages |
---|
pthread_cleanup_pop(3c) - opensolaris |
pthread_cleanup_push(3c) - sunos |
pthread_cleanup_pop(3t) - hpux |
pthread_cancel(3) - osf1 |
pthread_cleanup_pop(3c) - sunos |
Similar Topics in the Unix Linux Community |
---|
pthread_cleanup_push/pop - cleanup handler problem |