diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-02-28 16:15:35 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-02-28 16:15:35 +0000 |
commit | 5088d978385ce6d28db1731aab57b23ca1f6e9cc (patch) | |
tree | 2e061c7ff3c5287ac53f2945421425209cb2c33e /cpukit/score/src/threadcreateidle.c | |
parent | 2008-02-28 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-5088d978385ce6d28db1731aab57b23ca1f6e9cc.tar.bz2 |
2008-02-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/task.h, itron/src/cre_tsk.c,
posix/src/pthreadcreate.c, rtems/src/taskcreate.c,
rtems/src/taskdelete.c, rtems/src/timerserver.c,
score/src/threadclose.c, score/src/threadcreateidle.c,
score/src/threadinitialize.c: Switch task create and delete
operations to using API Allocator Mutex. This moves almost all uses
of the RTEMS Workspace from dispatching disabled to mutex protected
which should improve deterministic behavior. The implementation was
carefully done to allow task create and delete extensions to invoke
more services. In particular, a task delete extension should be able
to do mutex and file operations.
Diffstat (limited to 'cpukit/score/src/threadcreateidle.c')
-rw-r--r-- | cpukit/score/src/threadcreateidle.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c index 602fc7840b..3eaff869cf 100644 --- a/cpukit/score/src/threadcreateidle.c +++ b/cpukit/score/src/threadcreateidle.c @@ -2,7 +2,7 @@ * Thread Handler * * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -68,6 +68,13 @@ void _Thread_Create_idle( void ) if ( idle_task_stack_size < STACK_MINIMUM_SIZE ) idle_task_stack_size = STACK_MINIMUM_SIZE; + /* + * This is only called during initialization and we better be sure + * that when _Thread_Initialize unnests dispatch that we do not + * do anything stupid. + */ + _Thread_Disable_dispatch(); + _Thread_Initialize( &_Thread_Internal_information, _Thread_Idle, @@ -82,6 +89,8 @@ void _Thread_Create_idle( void ) (Objects_Name) _Thread_Idle_name ); + _Thread_Unnest_dispatch(); + /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. |