From ab9f05fd540b3eff6456f886edda87cb95bfbadc Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 23 Mar 1999 19:43:43 +0000 Subject: Wed Mar 24 11:32:07 1999 Ross Johnson * misc.c (CancelableWait): Initialise exceptionInformation[2]. (pthread_self): Get a real Win32 thread handle for implicit threads. * cancel.c (pthread_testcancel): Initialise exceptionInformation[2]. * implement.h (SE_INFORMATION): Fix values. * private.c (_pthread_threadDestroy): Close the thread handle. Fri Mar 19 12:57:27 1999 Ross Johnson * cancel.c (comments): Update and cleanup. Fri Mar 19 09:12:59 1999 Ross Johnson * private.c (_pthread_threadStart): status returns PTHREAD_CANCELED. * pthread.h (PTHREAD_CANCELED): defined. --- private.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'private.c') diff --git a/private.c b/private.c index 9ffd1b3..dd6890c 100644 --- a/private.c +++ b/private.c @@ -33,9 +33,6 @@ #include "pthread.h" #include "implement.h" -/* - * Code contributed by John E. Bossom . - */ int _pthread_processInitialize (void) @@ -224,7 +221,7 @@ _pthread_threadStart (ThreadParms * threadParms) */ return (status); -} /* threadStart */ +} /* _pthread_threadStart */ void _pthread_threadDestroy (pthread_t thread) @@ -238,10 +235,15 @@ _pthread_threadDestroy (pthread_t thread) CloseHandle (thread->cancelEvent); } + if( thread->threadH != 0 ) + { + CloseHandle( thread->threadH ); + } + free (thread); } -} /* threadDestroy */ +} /* _pthread_threadDestroy */ int _pthread_tkAssocCreate (ThreadKeyAssoc ** assocP, @@ -347,7 +349,7 @@ FAIL0: return (result); -} /* tkAssocCreate */ +} /* _pthread_tkAssocCreate */ void @@ -376,7 +378,7 @@ _pthread_tkAssocDestroy (ThreadKeyAssoc * assoc) free (assoc); } -} /* tkAssocDestroy */ +} /* _pthread_tkAssocDestroy */ void @@ -507,9 +509,5 @@ _pthread_callUserDestroyRoutines (pthread_t thread) } } -} /* callUserDestroyRoutines */ - -/* */ - - +} /* _pthread_callUserDestroyRoutines */ -- cgit v1.2.3