4.104.115
Last change
on this file since ba3e987e was
345fc11,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/22/08 at 20:38:03
|
2008-05-22 Joel Sherrill <joel.sherrill@…>
- 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.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2008. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #if HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <rtems/itron.h> |
---|
17 | #include <assert.h> |
---|
18 | |
---|
19 | #include <rtems/score/thread.h> |
---|
20 | #include <rtems/score/userext.h> |
---|
21 | #include <rtems/score/wkspace.h> |
---|
22 | #include <rtems/score/apiext.h> |
---|
23 | #include <rtems/score/apimutex.h> |
---|
24 | #include <rtems/score/sysstate.h> |
---|
25 | |
---|
26 | #include <rtems/itron/task.h> |
---|
27 | |
---|
28 | /* |
---|
29 | * exd_tsk - Exit and Delete Task |
---|
30 | */ |
---|
31 | |
---|
32 | void exd_tsk( void ) |
---|
33 | { |
---|
34 | Objects_Information *the_information; |
---|
35 | |
---|
36 | _RTEMS_Lock_allocator(); |
---|
37 | _Thread_Disable_dispatch(); |
---|
38 | |
---|
39 | the_information = _Objects_Get_information_id(_Thread_Executing->Object.id); |
---|
40 | |
---|
41 | /* This should never happen if _Thread_Get() works right */ |
---|
42 | assert( the_information ); |
---|
43 | |
---|
44 | _Thread_Close( the_information, _Thread_Executing ); |
---|
45 | |
---|
46 | _ITRON_Task_Free( _Thread_Executing ); |
---|
47 | |
---|
48 | _RTEMS_Unlock_allocator(); |
---|
49 | _Thread_Enable_dispatch(); |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.