Lines Matching defs:cleanup
2 * cleanup.c
54 * This function pops the most recently pushed cleanup
55 * handler. If execute is nonzero, then the cleanup handler
60 * if nonzero, execute the cleanup handler
64 * This function pops the most recently pushed cleanup
65 * handler. If execute is nonzero, then the cleanup handler
68 * of common cleanup code.
76 ptw32_cleanup_t *cleanup;
78 cleanup = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey);
80 if (cleanup != NULL)
82 if (execute && (cleanup->routine != NULL))
85 (*cleanup->routine) (cleanup->arg);
89 pthread_setspecific (ptw32_cleanupKey, (void *) cleanup->prev);
93 return (cleanup);
99 ptw32_push_cleanup (ptw32_cleanup_t * cleanup,
104 * This function pushes a new cleanup handler onto the thread's stack
105 * of cleanup handlers. Each cleanup handler pushed onto the stack is
113 * cleanup
117 * pointer to a cleanup handler,
120 * parameter to be passed to the cleanup handler
124 * This function pushes a new cleanup handler onto the thread's stack
125 * of cleanup handlers. Each cleanup handler pushed onto the stack is
136 * pointer to the previous cleanup
141 cleanup->routine = routine;
142 cleanup->arg = arg;
144 cleanup->prev = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey);
146 pthread_setspecific (ptw32_cleanupKey, (void *) cleanup);