summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/scheduler.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-26 11:22:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-27 19:40:13 +0200
commit9d82150f5a83e8dcf985de26799f99f7c46ec515 (patch)
treefe568eaa83c10f1bfa6374dbe92649fac93681b6 /cpukit/include/rtems/score/scheduler.h
parentrtems: Change rtems_task_get_affinity() status (diff)
downloadrtems-9d82150f5a83e8dcf985de26799f99f7c46ec515.tar.bz2
Return status code for _Scheduler_Set_affinity()
This avoids having conditional statements to get the API-specific status code.
Diffstat (limited to 'cpukit/include/rtems/score/scheduler.h')
-rw-r--r--cpukit/include/rtems/score/scheduler.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/include/rtems/score/scheduler.h b/cpukit/include/rtems/score/scheduler.h
index 7a566cf44d..da1e030ab8 100644
--- a/cpukit/include/rtems/score/scheduler.h
+++ b/cpukit/include/rtems/score/scheduler.h
@@ -21,6 +21,7 @@
#define _RTEMS_SCORE_SCHEDULER_H
#include <rtems/score/thread.h>
+#include <rtems/score/status.h>
#ifdef __cplusplus
extern "C" {
@@ -228,7 +229,7 @@ typedef struct {
#if defined(RTEMS_SMP)
/** @see _Scheduler_Set_affinity() */
- bool ( *set_affinity )(
+ Status_Control ( *set_affinity )(
const Scheduler_Control *,
Thread_Control *,
Scheduler_Node *,
@@ -581,10 +582,13 @@ void _Scheduler_default_Start_idle(
* @param node This parameter is unused.
* @param affinity The new processor affinity set for the thread.
*
- * @retval true The processor set of the scheduler is a subset of the affinity set.
- * @retval false The processor set of the scheduler is not a subset of the affinity set.
+ * @retval STATUS_SUCCESSFUL The affinity is a subset of the online
+ * processors.
+ *
+ * @retval STATUS_INVALID_NUMBER The affinity is not a subset of the online
+ * processors.
*/
- bool _Scheduler_default_Set_affinity(
+ Status_Control _Scheduler_default_Set_affinity(
const Scheduler_Control *scheduler,
Thread_Control *thread,
Scheduler_Node *node,