From 247469c6f6a16681491ac3ee213e57efcdda6153 Mon Sep 17 00:00:00 2001 From: rpj Date: Mon, 7 Mar 2011 01:23:25 +0000 Subject: exception handling and c++ casts --- ptw32_threadStart.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'ptw32_threadStart.c') diff --git a/ptw32_threadStart.c b/ptw32_threadStart.c index 8dcede3..3bc7ede 100644 --- a/ptw32_threadStart.c +++ b/ptw32_threadStart.c @@ -299,20 +299,11 @@ ptw32_threadStart (void *vthreadParms) { /* * A system unexpected exception has occurred running the user's - * terminate routine. We get control back within this block - cleanup - * and release the exception out of thread scope. + * terminate routine. We get control back within this block + * and exit with a substitue status. If the thread was not + * cancelled then this indicates the unhandled exception. */ status = sp->exitStatus = PTHREAD_CANCELED; - (void) pthread_mutex_lock (&sp->cancelLock); - sp->state = PThreadStateException; - (void) pthread_mutex_unlock (&sp->cancelLock); - (void) pthread_win32_thread_detach_np (); - (void) set_terminate (ptw32_oldTerminate); - throw; - - /* - * Never reached. - */ } (void) set_terminate (ptw32_oldTerminate); -- cgit v1.2.3