From 9db8705cc8ad2863dc0173b846783487742b313e Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Thu, 6 Feb 2014 12:42:24 -0600 Subject: score: Add cpuset support to Score. This new Score Handler provides a structure to manage a cpu_set_t plus helper routines to validate the contents against the current system configuration. --- cpukit/score/src/threadinitialize.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpukit/score/src/threadinitialize.c') diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 94ff8650c2..acd6636ac8 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -5,7 +5,7 @@ * @ingroup ScoreThread */ /* - * COPYRIGHT (c) 1989-2011. + * COPYRIGHT (c) 1989-2014. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -24,6 +24,7 @@ #include #include #include +#include #include bool _Thread_Initialize( @@ -206,6 +207,10 @@ bool _Thread_Initialize( /* Initialize the cpu field for the non-SMP schedulers */ the_thread->cpu = _Per_CPU_Get_by_index( 0 ); +#if __RTEMS_HAVE_SYS_CPUSET_H__ + the_thread->affinity = *(_CPU_set_Default()); + the_thread->affinity.set = &the_thread->affinity.preallocated; +#endif #endif the_thread->current_state = STATES_DORMANT; -- cgit v1.2.3