diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/pthread.c | 7 |
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 |