Changeset c0f4682 in rtems


Ignore:
Timestamp:
Aug 5, 2008, 1:10:16 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
cccd632
Parents:
6e97bf62
Message:

2008-08-05 Xudong Guan <xudong.guan@…>

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.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r6e97bf62 rc0f4682  
     12008-08-05      Xudong Guan <xudong.guan@criticalsoftware.com>
     2
     3        PR 1212/cpukit
     4        * rtems/src/taskmode.c, score/src/threadtickletimeslice.c: Time slicing
     5        will not happen if the task mode is changed from a non-timeslicing
     6        mode to timeslicing mode if it is done by the executing thread (e.g.
     7        in its task body). This change includes sp44 to demonstrate the
     8        problem and verify the correction.
     9
    1102008-08-04      Joel Sherrill <joel.sherrill@OARcorp.com>
    211
  • cpukit/rtems/src/taskmode.c

    r6e97bf62 rc0f4682  
    9090
    9191  if ( mask & RTEMS_TIMESLICE_MASK ) {
    92     if ( _Modes_Is_timeslice(mode_set) )
     92    if ( _Modes_Is_timeslice(mode_set) ) {
    9393      executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
    94     else
     94      executing->cpu_time_budget  = _Thread_Ticks_per_timeslice;
     95    } else
    9596      executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
    9697  }
  • cpukit/score/src/threadtickletimeslice.c

    r6e97bf62 rc0f4682  
    7878    case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
    7979    case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
    80       if ( --executing->cpu_time_budget == 0 ) {
     80      if ( (int)(--executing->cpu_time_budget) <= 0 ) {
    8181        _Thread_Reset_timeslice();
    8282        executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
Note: See TracChangeset for help on using the changeset viewer.