summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threaddispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/threaddispatch.c')
-rw-r--r--cpukit/score/src/threaddispatch.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index a4f5a1072f..e1b730052d 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -70,6 +70,8 @@ void _Thread_Dispatch( void )
_Thread_Executing = heir;
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
+ if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
+ heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
heir->ticks_executed++;
@@ -84,9 +86,6 @@ void _Thread_Dispatch( void )
_User_extensions_Thread_switch( executing, heir );
- if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
- heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
-
/*
* If the CPU has hardware floating point, then we must address saving
* and restoring it as part of the context switch.