summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/pthread.c')
-rw-r--r--cpukit/posix/src/pthread.c7
1 files changed, 6 insertions, 1 deletions
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