diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-14 09:31:47 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-05-14 09:37:19 +0200 |
commit | 57be57c79969b2f27580bc9af6fb2b14f321ab19 (patch) | |
tree | b086f331745b8eba5f7aa29ac7e7d8009b048e16 /cpukit/rtems | |
parent | rtems: Check entry point in rtems_task_start() (diff) | |
download | rtems-57be57c79969b2f27580bc9af6fb2b14f321ab19.tar.bz2 |
score: Return status in _Thread_Restart_other()
This simplifies rtems_task_restart().
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/src/taskrestart.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpukit/rtems/src/taskrestart.c b/cpukit/rtems/src/taskrestart.c index 6a56ff571b..00b0635cef 100644 --- a/cpukit/rtems/src/taskrestart.c +++ b/cpukit/rtems/src/taskrestart.c @@ -21,6 +21,7 @@ #endif #include <rtems/rtems/tasks.h> +#include <rtems/rtems/statusimpl.h> #include <rtems/score/threadimpl.h> rtems_status_code rtems_task_restart( @@ -31,7 +32,7 @@ rtems_status_code rtems_task_restart( Thread_Control *the_thread; ISR_lock_Context lock_context; Thread_Entry_information entry; - bool ok; + Status_Control status; the_thread = _Thread_Get( id, &lock_context ); @@ -53,7 +54,7 @@ rtems_status_code rtems_task_restart( RTEMS_UNREACHABLE(); } - ok = _Thread_Restart_other( the_thread, &entry, &lock_context ); + status = _Thread_Restart_other( the_thread, &entry, &lock_context ); - return ok ? RTEMS_SUCCESSFUL : RTEMS_INCORRECT_STATE; + return _Status_Get( status ); } |