diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-15 06:59:57 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-22 14:00:28 +0200 |
commit | eec08efc9048111f47f42142c30a92683bf6756c (patch) | |
tree | cad083e49ab757b47487f8489ed48c9204b65c38 /cpukit/posix/include/rtems/posix/pthreadimpl.h | |
parent | posix: Delete POSIX_API_Control::schedparam (diff) | |
download | rtems-eec08efc9048111f47f42142c30a92683bf6756c.tar.bz2 |
posix: Rework sporadic server scheduling policy
Instead of lowering the priority in case the initial budget is consumed
raise the priority for each new period. Restore the normal priority
once the initial budget is consumed. This makes it later easier to
combine the high priority phase with temporary priority boosts (e.g. via
priority ceiling and inheritance).
Use the thread lock to protect the POSIX thread attributes instead of
the thread state lock. This makes it easier to change the thread
priority and keep the POSIX attributes consistent.
Fixes a false positive use of uninitialized variable warning.
Diffstat (limited to 'cpukit/posix/include/rtems/posix/pthreadimpl.h')
-rw-r--r-- | cpukit/posix/include/rtems/posix/pthreadimpl.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/cpukit/posix/include/rtems/posix/pthreadimpl.h b/cpukit/posix/include/rtems/posix/pthreadimpl.h index ba99392574..988246ed53 100644 --- a/cpukit/posix/include/rtems/posix/pthreadimpl.h +++ b/cpukit/posix/include/rtems/posix/pthreadimpl.h @@ -62,7 +62,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Threads_Sporadic_timer_insert( _Timespec_To_ticks( &api->Attributes.schedparam.sched_ss_init_budget ); _Watchdog_Per_CPU_insert_relative( - &api->Sporadic_timer, + &api->Sporadic.Timer, _Per_CPU_Get(), _Timespec_To_ticks( &api->Attributes.schedparam.sched_ss_repl_period ) ); @@ -81,21 +81,6 @@ void _POSIX_Threads_Sporadic_budget_callout( ); /** - * This routine supports the sporadic scheduling algorithm. It - * is scheduled to be executed at the end of each replenishment - * period. In sporadic scheduling a thread will execute at a - * high priority for a user specified amount of CPU time. When - * it exceeds that amount of CPU time, its priority is automatically - * lowered. This TSR is executed when it is time to replenish - * the thread's processor budget and raise its priority. - * - * @param[in] id is ignored - * @param[in] argument is a pointer to the Thread_Control structure - * for the thread being replenished. - */ -void _POSIX_Threads_Sporadic_budget_TSR( Watchdog_Control *watchdog ); - -/** * @brief Translate sched_param into SuperCore terms. * * This method translates the POSIX API sched_param into the corresponding |