NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO | NOTES
cc –mt [ flag... ] file... –lpthread [ -lrt library... ] #include <pthread.h>void pthread_cleanup_pop(int execute);
pthread_cleanup_pop() removes the cleanup handler routine at the top of the cancellation cleanup stack of the calling thread and executes it if execute is non-zero.
When the thread calls pthread_cleanup_pop() with a non-zero execute argument, the argument at the top of the stack is popped and executed. An argument of 0 pops the handler without executing it.
The Solaris system generates a compile time error if pthread_cleanup_push() does not have a matching pthread-cleanup_pop( ).
Be aware that using longjmp() or siglongjmp() to jump into or out of a push/pop pair can lead to trouble, as either the matching push or the matching pop statement might not get executed.
The pthread_cleanup_pop() function returns no value.
No errors are defined.
The pthread_cleanup_pop() function will not return an error code of EINTR.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
MT-Level | MT-Safe |
cancellation(3THR), condition(3THR), pthread_cancel(3THR), pthread_cleanup_push(3THR), pthread_exit(3THR), pthread_join(3THR), pthread_setcancelstate(3THR), pthread_setcanceltype(3THR), pthread_testcancel(3THR), setjmp(3C), attributes(5)
See cancellation(3THR) for a discussion of cancellation concepts.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO | NOTES