From 9d82150f5a83e8dcf985de26799f99f7c46ec515 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 26 Apr 2021 11:22:39 +0200 Subject: Return status code for _Scheduler_Set_affinity() This avoids having conditional statements to get the API-specific status code. --- cpukit/include/rtems/score/scheduler.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'cpukit/include/rtems/score/scheduler.h') 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 +#include #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, -- cgit v1.2.3