summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/thread.h
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2014-02-06 12:42:24 -0600
committerJennifer Averett <jennifer.averett@oarcorp.com>2014-03-07 09:07:59 -0600
commit9db8705cc8ad2863dc0173b846783487742b313e (patch)
tree8e3c8ee82053cc68097e359a3087e418c13e9d69 /cpukit/score/include/rtems/score/thread.h
parentspcpuset01: Add check for sys/cpuset.h. (diff)
downloadrtems-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.h18
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;