[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


pthread_cleanup_pop

Removes the cleanup handler and optionally executes it.

Syntax

pthread_cleanup_pop(
                    execute );
 


Argument Data Type Access

execute integer read


C Binding

#include 

void pthread_cleanup_pop( int execute);

Arguments

execute
Integer that specifies whether the cleanup routine specified in the matching call to pthread_cleanup_push is executed. A nonzero value will cause the routine to be executed. This routine can be used to clean up from a block of code whether exited by cancellation or normal completion.

Description

This routine removes the cleanup routine and executes it if the value specified in execute is nonzero.

This routine and pthread_cleanup_push 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 (}).

Return Values

None

Associated Routines

   pthread_cancel
   pthread_cleanup_push
   pthread_create
   pthread_exit



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]