Changeset 40ee2fc0 in rtems


Ignore:
Timestamp:
Sep 20, 2011, 1:06:42 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, master
Children:
74416035
Parents:
3fb73e22
Message:

2011-09-20 Petr Benes <benesp16@…>

PR 1916/testing

  • rtems/src/ratemondelete.c, score/src/schedulercbsreleasejob.c, score/src/scheduleredfupdate.c, score/src/scheduleredfyield.c: Rework to improve coverage.
Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r3fb73e22 r40ee2fc0  
     12011-09-20      Petr Benes <benesp16@fel.cvut.cz>
     2
     3        PR 1916/testing
     4        * rtems/src/ratemondelete.c, score/src/schedulercbsreleasejob.c,
     5        score/src/scheduleredfupdate.c, score/src/scheduleredfyield.c: Rework
     6        to improve coverage.
     7
    182011-09-16      Sebastian Huber <sebastian.huber@embedded-brains.de>
    29
  • cpukit/rtems/src/ratemondelete.c

    r3fb73e22 r40ee2fc0  
    4848
    4949    case OBJECTS_LOCAL:
     50      _Scheduler_Release_job(the_period->owner, 0);
    5051      _Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
    5152      (void) _Watchdog_Remove( &the_period->Timer );
    5253      the_period->state = RATE_MONOTONIC_INACTIVE;
    5354      _Rate_monotonic_Free( the_period );
    54       _Scheduler_Release_job(the_period->owner, 0);
    5555      _Thread_Enable_dispatch();
    5656      return RTEMS_SUCCESSFUL;
  • cpukit/score/src/schedulercbsreleasejob.c

    r3fb73e22 r40ee2fc0  
    3232  if (deadline) {
    3333    /* Initializing or shifting deadline. */
    34     if (serv_info && serv_info->parameters.budget)
     34    if (serv_info)
    3535      new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
    3636        & ~SCHEDULER_EDF_PRIO_MSB;
     
    4545
    4646  /* Budget replenishment for the next job. */
    47   if (serv_info && serv_info->parameters.budget)
     47  if (serv_info)
    4848    the_thread->cpu_time_budget = serv_info->parameters.budget;
    4949
  • cpukit/score/src/scheduleredfupdate.c

    r3fb73e22 r40ee2fc0  
    3636    sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
    3737  }
    38 
    39   if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) {
    40     _RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node);
    41     _RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node);
    42 
    43     _Scheduler_EDF_Schedule();
    44     if ( _Thread_Executing != _Thread_Heir ) {
    45       if ( _Thread_Executing->is_preemptible ||
    46            the_thread->current_priority == 0 )
    47         _Thread_Dispatch_necessary = true;
    48     }
    49   }
    5038}
  • cpukit/score/src/scheduleredfyield.c

    r3fb73e22 r40ee2fc0  
    2222void _Scheduler_EDF_Yield(void)
    2323{
    24   Scheduler_EDF_Per_thread *first_info;
    25   RBTree_Node              *first_node;
    2624  ISR_Level                 level;
    2725
     
    3331  _ISR_Disable( level );
    3432
    35   if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) {
    36     /*
    37      * The RBTree has more than one node, enqueue behind the tasks
    38      * with the same priority in case there are such ones.
    39      */
    40     _RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node );
    41     _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node );
     33  /*
     34   * The RBTree has more than one node, enqueue behind the tasks
     35   * with the same priority in case there are such ones.
     36   */
     37  _RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node );
     38  _RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node );
    4239
    43     _ISR_Flash( level );
     40  _ISR_Flash( level );
    4441
    45     if ( _Thread_Is_heir( executing ) ) {
    46       first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT );
    47       first_info =
    48         _RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node);
    49       _Thread_Heir = first_info->thread;
    50     }
    51     _Thread_Dispatch_necessary = true;
    52   }
    53   else if ( !_Thread_Is_heir( executing ) )
    54     _Thread_Dispatch_necessary = true;
     42  _Scheduler_EDF_Schedule();
     43  _Thread_Dispatch_necessary = true;
    5544
    5645  _ISR_Enable( level );
Note: See TracChangeset for help on using the changeset viewer.