diff options
Diffstat (limited to 'cleanup.c')
-rw-r--r-- | cleanup.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -74,17 +74,17 @@ ptw32_pop_cleanup (int execute) */ { ptw32_cleanup_t *cleanup = NULL; - + cleanup = (ptw32_cleanup_t *) pthread_getspecific (ptw32_cleanupKey); if (cleanup != NULL) { if (execute && (cleanup->routine != NULL)) - { + { (*cleanup->routine) (cleanup->arg); - } + } pthread_setspecific (ptw32_cleanupKey, (void *) cleanup->prev); @@ -92,13 +92,12 @@ ptw32_pop_cleanup (int execute) return (cleanup); -} /* ptw32_pop_cleanup */ +} /* ptw32_pop_cleanup */ void ptw32_push_cleanup (ptw32_cleanup_t * cleanup, - ptw32_cleanup_callback_t routine, - void *arg) + ptw32_cleanup_callback_t routine, void *arg) /* * ------------------------------------------------------ * DOCPUBLIC @@ -146,4 +145,4 @@ ptw32_push_cleanup (ptw32_cleanup_t * cleanup, pthread_setspecific (ptw32_cleanupKey, (void *) cleanup); -} /* ptw32_push_cleanup */ +} /* ptw32_push_cleanup */ |