Cleanup primitives for pthread threads. More...
Cleanup primitives for pthread threads.
Definition in file pthread_cleanup.h.
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | __pthread_cleanup_datum |
| Internal structure for pthread_cleanup_push() More... | |
| #define | pthread_cleanup_push(ROUTINE, ARG) |
| Open a cleanup frame. More... | |
| #define | pthread_cleanup_pop(EXECUTE) |
| Closes a cleanup frame. More... | |
| typedef struct __pthread_cleanup_datum | __pthread_cleanup_datum_t |
| Internal structure for pthread_cleanup_push() | |
| void | __pthread_cleanup_push (__pthread_cleanup_datum_t *datum) |
| Internal function to be called by pthread_cleanup_push() More... | |
| void | __pthread_cleanup_pop (__pthread_cleanup_datum_t *datum, int execute) |
| Internal function to be called by pthread_cleanup_push() More... | |
| #define pthread_cleanup_pop | ( | EXECUTE | ) |
Closes a cleanup frame.
Must be paired with pthread_cleanup_push().
| [in] | EXECUTE | Iff != 0 call cleanup handler. |
Definition at line 87 of file pthread_cleanup.h.
| #define pthread_cleanup_push | ( | ROUTINE, | |
| ARG | |||
| ) |
Open a cleanup frame.
This function must be paired with pthread_cleanup_pop().
The cleanup function is called if the current thread exists inside the frame by means of pthread_exit(), or if the thread was cancelled.
You must not return, continue, or break out of the cleanup frame.
The frame opens a scope. Variables declared inside this scope won't be visible outside.
| [in] | ROUTINE | Function to call on cleanup. |
| [in] | ARG | Argument to supply to the cleanup handler. |
Definition at line 71 of file pthread_cleanup.h.
| void __pthread_cleanup_pop | ( | __pthread_cleanup_datum_t * | datum, |
| int | execute | ||
| ) |
Internal function to be called by pthread_cleanup_push()
This function leaves the cleanup frame that was opened with __pthread_cleanup_push().
| [in] | datum | Parameter that was supplied to __pthread_cleanup_push(). |
| [in] | execute | Iff != 0 call cleanup handler. |
| void __pthread_cleanup_push | ( | __pthread_cleanup_datum_t * | datum | ) |
Internal function to be called by pthread_cleanup_push()
The previous top of the stack gets stored in datum->next.
| [in] | datum | Allocated in the stack, datum tells how to cleanup. |