summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2004-09-27 22:43:14 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2004-09-27 22:43:14 +0000
commit0f5bc89c21790a08ccef679a1966bebe9c5e51ca (patch)
tree9cf099e3f32e0977cc90198d40cd1ffb77ef6a04
parentCorrect PR category. (diff)
downloadrtems-0f5bc89c21790a08ccef679a1966bebe9c5e51ca.tar.bz2
2004-09-27 Joel Sherrill <joel@OARcorp.com>
PR 294/rtems * src/pthread.c: POSIX thread exit handler now confirms that it created the executing thread before implicitly exitting it.
-rw-r--r--cpukit/posix/ChangeLog6
-rw-r--r--cpukit/posix/src/pthread.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/cpukit/posix/ChangeLog b/cpukit/posix/ChangeLog
index 1fed088e06..48be8ff8e3 100644
--- a/cpukit/posix/ChangeLog
+++ b/cpukit/posix/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-27 Joel Sherrill <joel@OARcorp.com>
+
+ PR 294/rtems
+ * src/pthread.c: POSIX thread exit handler now confirms that it created
+ the executing thread before implicitly exitting it.
+
2004-05-21 Joel Sherrill <joel@OARcorp.com>
PR 628/rtems
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index e91bcd4708..10193c849e 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