summaryrefslogtreecommitdiff
path: root/cleanup.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-05-17 01:38:02 +0000
committerrpj <rpj>2004-05-17 01:38:02 +0000
commit771465fed0cf50ee2dd790723245fc091699c324 (patch)
treed8c18d095a33fe7c4564bd90c5f313bb9e4057dd /cleanup.c
parent8b14911744f58cbe3730703f3fcc41cd969fd0f3 (diff)
re-indentation, bug fixes, hooks for pre-emptive async cancelation
Diffstat (limited to 'cleanup.c')
-rw-r--r--cleanup.c13
1 files changed, 6 insertions, 7 deletions
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 */