From 907de7f11ebcac02b705b421c3a4480cac9deaaf Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 18 Mar 1999 16:18:39 +0000 Subject: ==> ChangeLog <== Fri Mar 19 09:12:59 1999 Ross Johnson * private.c (_pthread_threadStart): status returns PTHREAD_CANCELED. * pthread.h (PTHREAD_CANCELED): defined. ==> tests/ChangeLog <== Fri Mar 19 1999 Ross Johnson * *.bat: redirect unwanted output to nul: * runall.bat: new. * cancel1.c: new. Not part of suite yet. --- private.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'private.c') diff --git a/private.c b/private.c index a4cdcda..9ffd1b3 100644 --- a/private.c +++ b/private.c @@ -147,7 +147,7 @@ _pthread_threadStart (ThreadParms * threadParms) void *(*start) (void *); void *arg; - int status; + void * status; tid = threadParms->tid; start = threadParms->start; @@ -165,7 +165,7 @@ _pthread_threadStart (ThreadParms * threadParms) * Run the caller's routine; */ (*start) (arg); - status = 0; + status = (void *) 0; } __except (EXCEPTION_EXECUTE_HANDLER) { @@ -173,7 +173,7 @@ _pthread_threadStart (ThreadParms * threadParms) * A system unexpected exception had occurred running the user's * routine. We get control back within this block. */ - status = -1; + status = PTHREAD_CANCELED; } #else /* _MSC_VER */ @@ -186,14 +186,14 @@ _pthread_threadStart (ThreadParms * threadParms) * Run the caller's routine; */ (*start) (arg); - status = 0; + status = (void *) 0; } catch (Pthread_exception) { /* * Thread was cancelled. */ - status = -1; + status = PTHREAD_CANCELED; } catch (...) { @@ -201,24 +201,28 @@ _pthread_threadStart (ThreadParms * threadParms) * A system unexpected exception had occurred running the user's * routine. We get control back within this block. */ - status = -1; + status = PTHREAD_CANCELED; } #else /* __cplusplus */ /* - * Run the caller's routine; + * Run the caller's routine; no cancelation or other exceptions will + * be honoured. */ (*start) (arg); - status = 0; + status = (void *) 0; #endif /* __cplusplus */ #endif /* _WIN32 */ - pthread_exit ((void *) status); + pthread_exit (status); - return ((void *) status); + /* + * Never reached. + */ + return (status); } /* threadStart */ -- cgit v1.2.3