summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/taskgetaffinity.c
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2014-03-18 13:55:54 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2014-04-03 10:48:57 -0500
commit54f345f5a5c9160b8839d080cdfd36ee13f4dada (patch)
tree4c94234e10ad890895bda1f00c12f1536805b732 /cpukit/rtems/src/taskgetaffinity.c
parentsapi: Add priority affinity smp scheduler. (diff)
downloadrtems-54f345f5a5c9160b8839d080cdfd36ee13f4dada.tar.bz2
rtems: Move affinity from thread to scheduler.
Diffstat (limited to 'cpukit/rtems/src/taskgetaffinity.c')
-rw-r--r--cpukit/rtems/src/taskgetaffinity.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/rtems/src/taskgetaffinity.c b/cpukit/rtems/src/taskgetaffinity.c
index 041eb273a3..d9cc25e646 100644
--- a/cpukit/rtems/src/taskgetaffinity.c
+++ b/cpukit/rtems/src/taskgetaffinity.c
@@ -23,6 +23,8 @@
#include <rtems/rtems/tasks.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/cpusetimpl.h>
+#include <rtems/score/schedulerimpl.h>
+
rtems_status_code rtems_task_get_affinity(
rtems_id id,
@@ -42,10 +44,8 @@ rtems_status_code rtems_task_get_affinity(
switch ( location ) {
case OBJECTS_LOCAL:
- if ( cpusetsize != the_thread->affinity.setsize ) {
+ if ( ! _Scheduler_Get_affinity( the_thread, cpusetsize, cpuset )) {
status = RTEMS_INVALID_NUMBER;
- } else {
- CPU_COPY( cpuset, the_thread->affinity.set );
}
_Objects_Put( &the_thread->Object );
return status;