diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-05-07 17:09:20 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-05-07 17:09:20 +0000 |
commit | 5a909149ca1ed7232c61625856ce7eff232930c0 (patch) | |
tree | 46c8fa6e7de8bb904ab69898e8f52c9dcef64228 /c/src/exec/rtems | |
parent | Patch from Jiri Gaisler <jgais@ws.estec.esa.nl> to allow stacksize (diff) | |
download | rtems-5a909149ca1ed7232c61625856ce7eff232930c0.tar.bz2 |
Made all calls to _Thread_Yield_processor consistent in how they are
wrapped by calls to _Thread_Enable_dispatch and _Thread_Disable_dispatch.
Diffstat (limited to 'c/src/exec/rtems')
-rw-r--r-- | c/src/exec/rtems/src/tasks.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/c/src/exec/rtems/src/tasks.c b/c/src/exec/rtems/src/tasks.c index 5f6c8366c4..0f3596c800 100644 --- a/c/src/exec/rtems/src/tasks.c +++ b/c/src/exec/rtems/src/tasks.c @@ -1055,11 +1055,10 @@ rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { - if ( ticks == 0 ) { - _Thread_Yield_processor(); - _Thread_Dispatch(); - } else { - _Thread_Disable_dispatch(); + _Thread_Disable_dispatch(); + if ( ticks == 0 ) { + _Thread_Yield_processor(); + } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( &_Thread_Executing->Timer, @@ -1068,8 +1067,8 @@ rtems_status_code rtems_task_wake_after( NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); - _Thread_Enable_dispatch(); - } + } + _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } |