From 260b0c2155d809beb550b13fa4fcb08408af5d3f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 30 Aug 1999 18:05:48 +0000 Subject: Patch from Charles-Antoine Gauthier to add support for return codes from POSIX threads that do an implicit exit by returning from the bottom of the main function. --- cpukit/posix/src/pthread.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index 1a238b006a..2a529ba49a 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -219,6 +219,18 @@ User_extensions_routine _POSIX_Threads_Delete_extension( (void) _Workspace_Free( api ); } +/* + * + * _POSIX_Threads_Exitted_extension + */ + +User_extensions_routine _POSIX_Threads_Exitted_extension( + Thread_Control *executing +) +{ + pthread_exit( executing->Wait.return_argument ); +} + /*PAGE * * _POSIX_Threads_Initialize_user_threads @@ -293,7 +305,7 @@ User_extensions_Control _POSIX_Threads_User_extensions = { _POSIX_Threads_Delete_extension, /* delete */ NULL, /* switch */ NULL, /* begin */ - NULL, /* exitted */ + _POSIX_Threads_Exitted_extension, /* exitted */ NULL /* fatal */ } }; -- cgit v1.2.3