summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-26 13:36:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-27 19:40:13 +0200
commitbbc93c119c72f981b5091fa06aea5e7369b79a59 (patch)
tree6c637a0cbfd20e32a2076395034014538de7c561 /cpukit/rtems/src
parentReturn status code for _Scheduler_Set_affinity() (diff)
downloadrtems-bbc93c119c72f981b5091fa06aea5e7369b79a59.tar.bz2
Return status code for _Thread_Start()
This avoids having conditional statements to get the API-specific status code.
Diffstat (limited to 'cpukit/rtems/src')
-rw-r--r--cpukit/rtems/src/taskstart.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpukit/rtems/src/taskstart.c b/cpukit/rtems/src/taskstart.c
index da29240961..eca9b5795d 100644
--- a/cpukit/rtems/src/taskstart.c
+++ b/cpukit/rtems/src/taskstart.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_start(
@@ -40,7 +41,7 @@ rtems_status_code rtems_task_start(
};
Thread_Control *the_thread;
ISR_lock_Context lock_context;
- bool ok;
+ Status_Control status;
the_thread = _Thread_Get( id, &lock_context );
@@ -54,7 +55,7 @@ rtems_status_code rtems_task_start(
return RTEMS_INVALID_ID;
}
- ok = _Thread_Start( the_thread, &entry, &lock_context );
+ status = _Thread_Start( the_thread, &entry, &lock_context );
- return ok ? RTEMS_SUCCESSFUL : RTEMS_INCORRECT_STATE;
+ return _Status_Get( status );
}