diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-03 15:03:35 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-04 11:01:18 +0200 |
commit | 24934e36e2513f972510d7c746103be1f766dc6a (patch) | |
tree | 66e3c8840cec6c1262f142e25ec545926140dbf9 /cpukit/rtems/src/tasksetaffinity.c | |
parent | score: Add and use Scheduler_simple_Control (diff) | |
download | rtems-24934e36e2513f972510d7c746103be1f766dc6a.tar.bz2 |
score: Add scheduler control to scheduler ops
Scheduler operations must be free of a global scheduler context to
enable partitioned/clustered scheduling.
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/src/tasksetaffinity.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpukit/rtems/src/tasksetaffinity.c b/cpukit/rtems/src/tasksetaffinity.c index 4d767410a9..6d8def7aca 100644 --- a/cpukit/rtems/src/tasksetaffinity.c +++ b/cpukit/rtems/src/tasksetaffinity.c @@ -42,12 +42,14 @@ rtems_status_code rtems_task_set_affinity( switch ( location ) { case OBJECTS_LOCAL: - ok = _Scheduler_Set_affinity( the_thread, cpusetsize, cpuset ); + ok = _Scheduler_Set_affinity( + _Scheduler_Get( the_thread ), + the_thread, + cpusetsize, + cpuset + ); _Objects_Put( &the_thread->Object ); - if (! ok) { - return RTEMS_INVALID_NUMBER; - } - return RTEMS_SUCCESSFUL; + return ok ? RTEMS_SUCCESSFUL : RTEMS_INVALID_NUMBER; #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: |