diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-12 21:20:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-12 21:20:04 +0000 |
commit | 3971537bd21ec5e0020a6278fe32c0a3c451fba3 (patch) | |
tree | ef12922256ff331367abb08a57a059b305fdd7a4 /c/src/exec | |
parent | + Moved error checks to before the disable dispatch where possible. (diff) | |
download | rtems-3971537bd21ec5e0020a6278fe32c0a3c451fba3.tar.bz2 |
+ Changed validation of the_thread to validation of location.
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/itron/src/rel_wai.c | 8 | ||||
-rw-r--r-- | c/src/exec/itron/src/rsm_tsk.c | 17 |
2 files changed, 8 insertions, 17 deletions
diff --git a/c/src/exec/itron/src/rel_wai.c b/c/src/exec/itron/src/rel_wai.c index 81d7e6dc94..1fb3cbbcd4 100644 --- a/c/src/exec/itron/src/rel_wai.c +++ b/c/src/exec/itron/src/rel_wai.c @@ -28,16 +28,10 @@ ER rel_wai( Objects_Locations location; the_thread = _ITRON_Task_Get( tskid, &location ); - if (!the_thread) - _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) ); - - _Thread_Disable_dispatch(); - switch ( location ) { case OBJECTS_REMOTE: case OBJECTS_ERROR: - _Thread_Enable_dispatch(); - return _ITRON_Task_Clarify_get_id_error( tskid ); + _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) ); case OBJECTS_LOCAL: /* diff --git a/c/src/exec/itron/src/rsm_tsk.c b/c/src/exec/itron/src/rsm_tsk.c index 81be3446eb..98d96c4798 100644 --- a/c/src/exec/itron/src/rsm_tsk.c +++ b/c/src/exec/itron/src/rsm_tsk.c @@ -29,22 +29,19 @@ ER rsm_tsk( Objects_Locations location; the_thread = _ITRON_Task_Get( tskid, &location ); - - if (!the_thread) - _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) ); - - if ( the_thread == _Thread_Executing ) - _ITRON_return_errorno( E_OBJ ); - - if (_States_Is_dormant( the_thread->current_state )) - _ITRON_return_errorno( E_OBJ ); - switch ( location ) { case OBJECTS_REMOTE: case OBJECTS_ERROR: _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) ); case OBJECTS_LOCAL: + + if ( _Thread_Is_executing( the_thread ) ) + _ITRON_return_errorno( E_OBJ ); + + if ( _States_Is_dormant( the_thread->current_state )) + _ITRON_return_errorno( E_OBJ ); + _Thread_Resume( the_thread, FALSE ); _Thread_Enable_dispatch(); return E_OK; |