From e785fbaae519e096e636e1dcea5a739dfead8c46 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 4 Apr 2014 13:58:26 +0200 Subject: score: Delete _Thread_Ticks_per_timeslice Use the Configuration instead. --- cpukit/posix/src/pthreadsetschedparam.c | 4 +++- cpukit/posix/src/sched_rr_get_interval.c | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c index 4b62179553..d5d0a5ba8a 100644 --- a/cpukit/posix/src/pthreadsetschedparam.c +++ b/cpukit/posix/src/pthreadsetschedparam.c @@ -30,6 +30,7 @@ #include #include #include +#include int pthread_setschedparam( pthread_t thread, @@ -83,7 +84,8 @@ int pthread_setschedparam( case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: - the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; + the_thread->cpu_time_budget = + rtems_configuration_get_ticks_per_timeslice(); the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); diff --git a/cpukit/posix/src/sched_rr_get_interval.c b/cpukit/posix/src/sched_rr_get_interval.c index 060cea0f58..1cb78eaf74 100644 --- a/cpukit/posix/src/sched_rr_get_interval.c +++ b/cpukit/posix/src/sched_rr_get_interval.c @@ -24,9 +24,8 @@ #include #include -#include -#include #include +#include #include int sched_rr_get_interval( @@ -44,6 +43,10 @@ int sched_rr_get_interval( if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); - _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); + _Timespec_From_ticks( + rtems_configuration_get_ticks_per_timeslice(), + interval + ); + return 0; } -- cgit v1.2.3