diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-04-03 05:55:59 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2010-04-03 05:55:59 +0000 |
commit | 3bacb250a81dca7d561c4ae236be2f3e85823c05 (patch) | |
tree | a3c927060f511a2a98656f9f98420fb2d8c2bad3 /cpukit/posix | |
parent | #include <unistd.h>. (diff) | |
download | rtems-3bacb250a81dca7d561c4ae236be2f3e85823c05.tar.bz2 |
Reflect POSIX sched_parm changes.
Diffstat (limited to 'cpukit/posix')
-rw-r--r-- | cpukit/posix/src/psxtransschedparam.c | 14 | ||||
-rw-r--r-- | cpukit/posix/src/pthread.c | 18 | ||||
-rw-r--r-- | cpukit/posix/src/pthreadcreate.c | 2 |
3 files changed, 17 insertions, 17 deletions
diff --git a/cpukit/posix/src/psxtransschedparam.c b/cpukit/posix/src/psxtransschedparam.c index 2ba1547ec0..7be4dcc641 100644 --- a/cpukit/posix/src/psxtransschedparam.c +++ b/cpukit/posix/src/psxtransschedparam.c @@ -49,19 +49,19 @@ int _POSIX_Thread_Translate_sched_param( } if ( policy == SCHED_SPORADIC ) { - if ( (param->ss_replenish_period.tv_sec == 0) && - (param->ss_replenish_period.tv_nsec == 0) ) + if ( (param->sched_ss_repl_period.tv_sec == 0) && + (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; - if ( (param->ss_initial_budget.tv_sec == 0) && - (param->ss_initial_budget.tv_nsec == 0) ) + if ( (param->sched_ss_init_budget.tv_sec == 0) && + (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; - if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < - _Timespec_To_ticks( ¶m->ss_initial_budget ) ) + if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < + _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; - if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) + if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index 1743a5de2b..6db3b08ced 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -48,9 +48,9 @@ const pthread_attr_t _POSIX_Threads_Default_attributes = { SCHED_FIFO, /* schedpolicy */ { /* schedparam */ 2, /* sched_priority */ - 0, /* ss_low_priority */ - { 0L, 0 }, /* ss_replenish_period */ - { 0L, 0 } /* ss_initial_budget */ + 0, /* sched_ss_low_priority */ + { 0L, 0 }, /* sched_ss_repl_period */ + { 0L, 0 } /* sched_ss_init_budget */ }, PTHREAD_CREATE_JOINABLE, /* detachstate */ 1 /* cputime_clock_allowed */ @@ -74,11 +74,11 @@ void _POSIX_Threads_Sporadic_budget_TSR( api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ - ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); + ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; - new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); + new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; /* @@ -101,7 +101,7 @@ void _POSIX_Threads_Sporadic_budget_TSR( } /* ticks is guaranteed to be at least one */ - ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); + ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } @@ -124,7 +124,7 @@ void _POSIX_Threads_Sporadic_budget_callout( */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ - new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); + new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; /* @@ -137,7 +137,7 @@ void _POSIX_Threads_Sporadic_budget_callout( if ( the_thread->resource_count == 0 ) { /* * Make sure we are actually lowering it. If they have lowered it - * to logically lower than ss_low_priority, then we do not want to + * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c index ed9557ce67..c5ca86d52e 100644 --- a/cpukit/posix/src/pthreadcreate.c +++ b/cpukit/posix/src/pthreadcreate.c @@ -226,7 +226,7 @@ int pthread_create( if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( &api->Sporadic_timer, - _Timespec_To_ticks( &api->schedparam.ss_replenish_period ) + _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ) ); } |