summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/pthread.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-06-18 19:01:57 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-06-18 19:01:57 +0000
commitcb1b853d0b494d5d3d3029a6432dffbe07fa1c4e (patch)
tree0f540fa0285b42ba57440ff8fc69148b3413a146 /c/src/exec/posix/src/pthread.c
parentModified _Objects_Is_class_valid() to correctly report that 0 was (diff)
downloadrtems-cb1b853d0b494d5d3d3029a6432dffbe07fa1c4e.tar.bz2
All task delete API level services were incorrectly assuming that the
task to be deleted was created via the same API (i.e. were of the object class created by this API). For example, a POSIX thread calling the rtems_task_delete(SELF) directive would incorrectly update the RTEMS object local pointer table. Jennifer discovered this when moving tests implemented in C using the Classic RTEMS API into a tree of Ada tests. The Ada tests were implicitly using POSIX services. This lead to some unexpected behavior.
Diffstat (limited to 'c/src/exec/posix/src/pthread.c')
-rw-r--r--c/src/exec/posix/src/pthread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c
index 3721832c43..f8c6116dd0 100644
--- a/c/src/exec/posix/src/pthread.c
+++ b/c/src/exec/posix/src/pthread.c
@@ -1144,11 +1144,15 @@ void pthread_exit(
void *value_ptr
)
{
+ Objects_Information *the_information;
+
+ the_information = _Objects_Get_information( _Thread_Executing->Object.id );
+
_Thread_Disable_dispatch();
_Thread_Executing->Wait.return_argument = (unsigned32 *)value_ptr;
- _Thread_Close( &_POSIX_Threads_Information, _Thread_Executing );
+ _Thread_Close( the_information, _Thread_Executing );
_POSIX_Threads_Free( _Thread_Executing );