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/ChangeLog | 6 ++++++ cpukit/posix/src/pthread.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 66e46d3294..c4488f1366 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +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. + 2004-09-27 Joel Sherrill * libmisc/stackchk/check.c: Spacing. 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