diff options
author | rpj <rpj> | 2004-05-17 01:38:02 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-05-17 01:38:02 +0000 |
commit | 771465fed0cf50ee2dd790723245fc091699c324 (patch) | |
tree | d8c18d095a33fe7c4564bd90c5f313bb9e4057dd /cleanup.c | |
parent | 8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff) |
re-indentation, bug fixes, hooks for pre-emptive async cancelation
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 */ |