diff options
author | Jennifer Averett <jennifer.averett@oarcorp.com> | 2014-03-06 08:37:21 -0600 |
---|---|---|
committer | Jennifer Averett <jennifer.averett@oarcorp.com> | 2014-04-03 10:46:24 -0500 |
commit | cfe457f9a61525b02c88503d7af76887b0976643 (patch) | |
tree | af14aada35aff9b9d49c6d323a8fd6ebba13a1e6 /cpukit/score/include/rtems/score/schedulerimpl.h | |
parent | 1a6093dc6035a8957f48da69e542d5e8dc77d33b (diff) |
score: score: Add get/set affinity to Scheduler Framework.
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulerimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/schedulerimpl.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h index a031715a6b..72f239fd6b 100644 --- a/cpukit/score/include/rtems/score/schedulerimpl.h +++ b/cpukit/score/include/rtems/score/schedulerimpl.h @@ -240,6 +240,38 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Start_idle( ( *_Scheduler.Operations.start_idle )( thread, processor ); } +#if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP) + /** + * @brief Obtain the processor affinity for a thread. + * + * @param[in,out] thread The thread. + * @parma[out] cpuset The processor affinity for this thread + */ + RTEMS_INLINE_ROUTINE int _Scheduler_Get_affinity( + Thread_Control *thread, + size_t cpusetsize, + cpu_set_t *cpuset + ) + { + return (*_Scheduler.Operations.get_affinity)( thread, cpusetsize, cpuset ); + } + + /** + * @brief Set the processor affinity for a thread. + * + * @param[in,out] thread The thread. + * @parma[in] cpuset The processor affinity for this thread + */ + RTEMS_INLINE_ROUTINE int _Scheduler_Set_affinity( + Thread_Control *thread, + size_t cpusetsize, + const cpu_set_t *cpuset + ) + { + return (*_Scheduler.Operations.set_affinity)( thread, cpusetsize, cpuset ); + } +#endif + RTEMS_INLINE_ROUTINE void _Scheduler_Update_heir( Thread_Control *heir, bool force_dispatch |