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/posix/src/pthreadgetaffinitynp.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 'cpukit/posix/src/pthreadgetaffinitynp.c')
-rw-r--r-- | cpukit/posix/src/pthreadgetaffinitynp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpukit/posix/src/pthreadgetaffinitynp.c b/cpukit/posix/src/pthreadgetaffinitynp.c index 497236f60f..41b8d30be2 100644 --- a/cpukit/posix/src/pthreadgetaffinitynp.c +++ b/cpukit/posix/src/pthreadgetaffinitynp.c @@ -47,12 +47,14 @@ int pthread_getaffinity_np( switch ( location ) { case OBJECTS_LOCAL: - ok = _Scheduler_Get_affinity( the_thread, cpusetsize, cpuset ); + ok = _Scheduler_Get_affinity( + _Scheduler_Get( the_thread ), + the_thread, + cpusetsize, + cpuset + ); _Objects_Put( &the_thread->Object ); - if (!ok) - return EINVAL; - return 0; - break; + return ok ? 0 : EINVAL; #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: |