From 092fe28eb2014bc648e62bbabbaf908dc76a0c05 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 27 Sep 2004 22:44:19 +0000 Subject: 2004-09-27 Joel Sherrill PR 294/rtems * posix/src/pthread.c: POSIX thread exit handler now confirms that it created the executing thread before implicitly exitting it. --- cpukit/posix/src/pthread.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpukit/posix/src/pthread.c') diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index 0212f9d6ac..bbd7a73a9e 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -239,7 +239,12 @@ User_extensions_routine _POSIX_Threads_Exitted_extension( Thread_Control *executing ) { - pthread_exit( executing->Wait.return_argument ); + /* + * If the executing thread was not created with the POSIX API, then this + * API do not get to define its exit behavior. + */ + if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API ) + pthread_exit( executing->Wait.return_argument ); } /*PAGE -- cgit v1.2.3