From 771465fed0cf50ee2dd790723245fc091699c324 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 17 May 2004 01:38:02 +0000 Subject: re-indentation, bug fixes, hooks for pre-emptive async cancelation --- cleanup.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'cleanup.c') diff --git a/cleanup.c b/cleanup.c index ed86f10..39f8404 100644 --- a/cleanup.c +++ b/cleanup.c @@ -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 */ -- cgit v1.2.3