From e54818fa1513ff6802c929d27f01df2257d8c153 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 26 Jul 1998 11:25:32 +0000 Subject: Sun Jul 26 13:06:12 1998 Ross Johnson * exit.c (_pthread_exit): New function. Called from pthread_exit() and _pthread_start_call() to exit the thread. It allows an extra argument which is the return code passed to _endthreadex(). * create.c (_pthread_start_call): Change pthread_exit() call to _pthread_exit() call. --- exit.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'exit.c') diff --git a/exit.c b/exit.c index 25fc678..37b5595 100644 --- a/exit.c +++ b/exit.c @@ -46,7 +46,7 @@ _pthread_vacuum(void) } void -pthread_exit(void * value) +_pthread_exit(void * value, int return_code) { _pthread_threads_thread_t * us = _PTHREAD_THIS; @@ -62,5 +62,11 @@ pthread_exit(void * value) _pthread_vacuum(); - _endthreadex(0); + _endthreadex(return_code); +} + +void +pthread_exit(void * value) +{ + _pthread_exit(value, 0); } -- cgit v1.2.3