summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadcreate.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-15 16:31:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-22 14:00:28 +0200
commit1a4eac500c9a2942f4aff7e27ccdfae3b99c4cb9 (patch)
treef43e5044a2b719a8cfc04cf58a5a31d620bd9eca /cpukit/posix/src/pthreadcreate.c
parentposix: Make POSIX API aware of scheduler instances (diff)
downloadrtems-1a4eac500c9a2942f4aff7e27ccdfae3b99c4cb9.tar.bz2
posix: Generalize _POSIX_Priority_To_core()
Move POSIX API priority validation into _POSIX_Priority_To_core().
Diffstat (limited to 'cpukit/posix/src/pthreadcreate.c')
-rw-r--r--cpukit/posix/src/pthreadcreate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index a4b468494a..b266a4cd7f 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -62,6 +62,7 @@ int pthread_create(
const pthread_attr_t *the_attr;
int low_prio;
int high_prio;
+ bool valid;
Priority_Control core_low_prio;
Priority_Control core_high_prio;
Thread_CPU_budget_algorithms budget_algorithm;
@@ -154,17 +155,16 @@ int pthread_create(
scheduler = _Scheduler_Get_own( executing );
- if ( !_POSIX_Priority_Is_valid( scheduler, low_prio ) ) {
+ core_low_prio = _POSIX_Priority_To_core( scheduler, low_prio, &valid );
+ if ( !valid ) {
return EINVAL;
}
- if ( !_POSIX_Priority_Is_valid( scheduler, high_prio ) ) {
+ core_high_prio = _POSIX_Priority_To_core( scheduler, high_prio, &valid );
+ if ( !valid ) {
return EINVAL;
}
- 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__
status = _CPU_set_Is_valid( the_attr->affinityset, the_attr->affinitysetsize );