summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-16 12:58:02 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-20 15:18:49 +0100
commit08adc0dc7f78ca24d8bbb16ebefe32c98154ac2b (patch)
treed403ea4791485038b4ccb5237771b20de101e607 /cpukit/rtems
parentrtems: New errors for rtems_signal_catch() (diff)
downloadrtems-08adc0dc7f78ca24d8bbb16ebefe32c98154ac2b.tar.bz2
rtems: Add _Modes_Apply_timeslice_to_thread()
Update #4244.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/taskmode.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c
index 6ca4e99fc6..6287d44ac1 100644
--- a/cpukit/rtems/src/taskmode.c
+++ b/cpukit/rtems/src/taskmode.c
@@ -27,7 +27,6 @@
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/smpimpl.h>
#include <rtems/score/threadimpl.h>
-#include <rtems/config.h>
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
@@ -98,13 +97,8 @@ rtems_status_code rtems_task_mode(
executing->is_preemptible = is_preempt_enabled;
}
- if ( mask & RTEMS_TIMESLICE_MASK ) {
- if ( _Modes_Is_timeslice(mode_set) ) {
- executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
- executing->cpu_time_budget =
- rtems_configuration_get_ticks_per_timeslice();
- } else
- executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
+ if ( ( mask & RTEMS_TIMESLICE_MASK ) != 0 ) {
+ _Modes_Apply_timeslice_to_thread( mode_set, executing );
}
if ( ( mask & RTEMS_INTERRUPT_MASK ) != 0 ) {