summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadtickletimeslice.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-05 13:10:16 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-05 13:10:16 +0000
commitc0f4682bbf1d570171a838f15973d0a02c092fb2 (patch)
tree6c36efb90a996921b9c2b4dc78648759429e4087 /cpukit/score/src/threadtickletimeslice.c
parent2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-c0f4682bbf1d570171a838f15973d0a02c092fb2.tar.bz2
2008-08-05 Xudong Guan <xudong.guan@criticalsoftware.com>
PR 1212/cpukit * rtems/src/taskmode.c, score/src/threadtickletimeslice.c: Time slicing will not happen if the task mode is changed from a non-timeslicing mode to timeslicing mode if it is done by the executing thread (e.g. in its task body). This change includes sp44 to demonstrate the problem and verify the correction.
Diffstat (limited to 'cpukit/score/src/threadtickletimeslice.c')
-rw-r--r--cpukit/score/src/threadtickletimeslice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/score/src/threadtickletimeslice.c b/cpukit/score/src/threadtickletimeslice.c
index fbccfcad7c..c0e87e90ac 100644
--- a/cpukit/score/src/threadtickletimeslice.c
+++ b/cpukit/score/src/threadtickletimeslice.c
@@ -77,7 +77,7 @@ void _Thread_Tickle_timeslice( void )
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
- if ( --executing->cpu_time_budget == 0 ) {
+ if ( (int)(--executing->cpu_time_budget) <= 0 ) {
_Thread_Reset_timeslice();
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}