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/include/rtems/score/thread.h | |
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/include/rtems/score/thread.h')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index bf500fe6f5..74852385b5 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -31,6 +31,13 @@ #include <rtems/score/threadq.h> #include <rtems/score/watchdog.h> +#ifdef RTEMS_SMP +#if __RTEMS_HAVE_SYS_CPUSET_H__ +#include <sys/cpuset.h> +#include <rtems/score/cpuset.h> +#endif +#endif + #ifdef __cplusplus extern "C" { #endif @@ -406,7 +413,18 @@ struct Thread_Control_struct { * happen in the meantime. */ bool is_executing; + +#if __RTEMS_HAVE_SYS_CPUSET_H__ + /** + * @brief This field controls affinity attributes for this thread. + * + * Affinity attributes indicate which cpus the thread can run on + * in an SMP system. + */ + CPU_set_Control affinity; +#endif #endif + #if __RTEMS_ADA__ /** This field is the GNAT self context pointer. */ void *rtems_ada_self; |