Establishes a cleanup handler to be executed when the thread exits or is canceled.
pthread_cleanup_push( routine, arg );
Argument Data Type Accessroutine procedure read arg user_arg read
#includevoid pthread_cleanup_push( void (*routine)(void *), void *arg);
This routine and pthread_cleanup_pop 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 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 (}).
None
pthread_cancel pthread_cleanup_pop pthread_create pthread_exit pthread_testcancel