diff options
author | Jennifer Averett <jennifer.averett@oarcorp.com> | 2014-02-06 12:42:24 -0600 |
---|---|---|
committer | Jennifer Averett <jennifer.averett@oarcorp.com> | 2014-03-07 09:07:59 -0600 |
commit | 9db8705cc8ad2863dc0173b846783487742b313e (patch) | |
tree | 8e3c8ee82053cc68097e359a3087e418c13e9d69 /cpukit/score/src/threadinitialize.c | |
parent | spcpuset01: Add check for sys/cpuset.h. (diff) | |
download | rtems-9db8705cc8ad2863dc0173b846783487742b313e.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score/src/threadinitialize.c')
-rw-r--r-- | cpukit/score/src/threadinitialize.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 <rtems/score/userextimpl.h> #include <rtems/score/watchdogimpl.h> #include <rtems/score/wkspace.h> +#include <rtems/score/cpusetimpl.h> #include <rtems/config.h> 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; |