diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-14 15:57:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 14:00:28 +0200 |
commit | 5a32c486f9b7bd8687af253931b47d7abb091bc3 (patch) | |
tree | 31f97524b91bb123eb316b00e8056e5d62cf5200 /cpukit/posix/src/pthreadcreate.c | |
parent | posix: Rework sporadic server scheduling policy (diff) | |
download | rtems-5a32c486f9b7bd8687af253931b47d7abb091bc3.tar.bz2 |
posix: Make POSIX API aware of scheduler instances
Diffstat (limited to 'cpukit/posix/src/pthreadcreate.c')
-rw-r--r-- | cpukit/posix/src/pthreadcreate.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index f2fc1ca68e..a4b468494a 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -70,6 +70,7 @@ int pthread_create( bool status; Thread_Control *the_thread; Thread_Control *executing; + const Scheduler_Control *scheduler; POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; @@ -151,16 +152,18 @@ int pthread_create( high_prio = low_prio; } - if ( !_POSIX_Priority_Is_valid( low_prio ) ) { + scheduler = _Scheduler_Get_own( executing ); + + if ( !_POSIX_Priority_Is_valid( scheduler, low_prio ) ) { return EINVAL; } - if ( !_POSIX_Priority_Is_valid( high_prio ) ) { + if ( !_POSIX_Priority_Is_valid( scheduler, high_prio ) ) { return EINVAL; } - core_low_prio = _POSIX_Priority_To_core( low_prio ); - core_high_prio = _POSIX_Priority_To_core( high_prio ); + core_low_prio = _POSIX_Priority_To_core( scheduler, low_prio ); + core_high_prio = _POSIX_Priority_To_core( scheduler, high_prio ); #if defined(RTEMS_SMP) #if __RTEMS_HAVE_SYS_CPUSET_H__ |