summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadclose.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-22 20:38:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-22 20:38:03 +0000
commit345fc11da9dcad5faa23f9888c8f3a0260e8ad45 (patch)
tree561c791f8d6342c00391dea6c1dd47f08ac82612 /cpukit/score/src/threadclose.c
parent2008-05-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-345fc11da9dcad5faa23f9888c8f3a0260e8ad45.tar.bz2
2008-05-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/task.h, itron/src/del_tsk.c, itron/src/exd_tsk.c, itron/src/task.c, posix/include/rtems/posix/threadsup.h, posix/src/cancel.c, posix/src/cancelrun.c, posix/src/pthread.c, posix/src/pthreadexit.c, posix/src/setcancelstate.c, posix/src/setcanceltype.c, posix/src/testcancel.c, rtems/src/taskdelete.c, score/inline/rtems/score/object.inl, score/src/objectclose.c, score/src/threadclose.c: Make all task delete/exit/cancel routines follow the same critical section pattern. Also ensure that POSIX cancelation routines are run at thread exit.
Diffstat (limited to 'cpukit/score/src/threadclose.c')
-rw-r--r--cpukit/score/src/threadclose.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpukit/score/src/threadclose.c b/cpukit/score/src/threadclose.c
index a29aebdca7..51db06f56c 100644
--- a/cpukit/score/src/threadclose.c
+++ b/cpukit/score/src/threadclose.c
@@ -45,6 +45,15 @@ void _Thread_Close(
Thread_Control *the_thread
)
{
+
+ /*
+ * Now we are in a dispatching critical section again and we
+ * can take the thread OUT of the published set. It is invalid
+ * to use this thread's Id after this call. This will prevent
+ * any other task from attempting to initiate a call on this task.
+ */
+ _Objects_Invalidate_Id( information, &the_thread->Object );
+
/*
* We assume the Allocator Mutex is locked when we get here.
* This provides sufficient protection to let the user extensions
@@ -61,7 +70,7 @@ void _Thread_Close(
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
- * to use this thread's Id after this call.
+ * to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );