summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulerimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/schedulerimpl.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index 2b8782fe7d..8b80db78c1 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -451,6 +451,24 @@ RTEMS_INLINE_ROUTINE const Scheduler_Control *_Scheduler_Get(
return &_Scheduler_Table[ 0 ];
}
+RTEMS_INLINE_ROUTINE bool _Scheduler_Set(
+ const Scheduler_Control *scheduler,
+ Thread_Control *the_thread
+)
+{
+ bool ok;
+
+ (void) scheduler;
+
+ if ( _States_Is_dormant( the_thread->current_state ) ) {
+ ok = true;
+ } else {
+ ok = false;
+ }
+
+ return ok;
+}
+
RTEMS_INLINE_ROUTINE Objects_Id _Scheduler_Build_id( uint32_t scheduler_index )
{
return _Objects_Build_id(
@@ -474,6 +492,13 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_Get_by_id(
return index < _Scheduler_Count;
}
+RTEMS_INLINE_ROUTINE uint32_t _Scheduler_Get_index(
+ const Scheduler_Control *scheduler
+)
+{
+ return (uint32_t) (scheduler - &_Scheduler_Table[ 0 ]);
+}
+
/** @} */
#ifdef __cplusplus