NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
$(OS_DIR)/lib/libpthreads.a #include <pthread.h>void pthread_cleanup_pop(int execute);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The pthread_cleanup_pop() function 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 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 be executed.
The pthread_cleanup_pop() function returns no value.
No errors are defined.
The pthread_cleanup_pop() function will not return the error code EINTR.
See attributes(5)for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
cancellation(3POSIX), pthread_cleanup_push(3POSIX), pthread_exit(3POSIX), pthread_join(3POSIX), pthread_setcancelstate(3POSIX), pthread_setcanceltype(3POSIX), pthread_testcancel(3POSIX), setjmp(3STDC)
NAME | SYNOPSIS | API RESTRICTIONS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO