Changeset 9a78f8a5 in rtems


Ignore:
Timestamp:
Jun 16, 2016, 3:08:54 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
99fc1d1d
Parents:
7ec66e08
git-author:
Sebastian Huber <sebastian.huber@…> (06/16/16 15:08:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/22/16 12:37:10)
Message:

score: Modify release job scheduler operation

Pass the deadline in watchdog ticks to the scheduler.

Update #2173.

Location:
cpukit
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/ratemonperiod.c

    r7ec66e08 r9a78f8a5  
    7272{
    7373  Per_CPU_Control *cpu_self;
     74  uint64_t deadline;
    7475
    7576  cpu_self = _Thread_Dispatch_disable_critical( lock_context );
    7677  _Rate_monotonic_Release( owner, lock_context );
    7778
    78   _Scheduler_Release_job( owner, next_length );
    79 
    8079  _ISR_lock_ISR_disable( lock_context );
    81   _Watchdog_Per_CPU_insert_relative(
     80  deadline = _Watchdog_Per_CPU_insert_relative(
    8281    &the_period->Timer,
    8382    cpu_self,
     
    8584  );
    8685  _ISR_lock_ISR_enable( lock_context );
     86
     87  _Scheduler_Release_job( owner, deadline );
    8788
    8889  _Thread_Dispatch_enable( cpu_self );
  • cpukit/score/include/rtems/score/scheduler.h

    r7ec66e08 r9a78f8a5  
    146146    const Scheduler_Control *,
    147147    Thread_Control *,
    148     uint32_t
     148    uint64_t
    149149  );
    150150
     
    509509  const Scheduler_Control *scheduler,
    510510  Thread_Control          *the_thread,
    511   uint32_t                 deadline
     511  uint64_t                 deadline
    512512);
    513513
  • cpukit/score/include/rtems/score/schedulercbs.h

    r7ec66e08 r9a78f8a5  
    180180  const Scheduler_Control *scheduler,
    181181  Thread_Control          *the_thread,
    182   uint32_t                 length
     182  uint64_t                 length
    183183);
    184184
  • cpukit/score/include/rtems/score/scheduleredf.h

    r7ec66e08 r9a78f8a5  
    253253  const Scheduler_Control *scheduler,
    254254  Thread_Control          *the_thread,
    255   uint32_t                 deadline
     255  uint64_t                 deadline
    256256);
    257257
  • cpukit/score/include/rtems/score/schedulerimpl.h

    r7ec66e08 r9a78f8a5  
    523523 *
    524524 * @param[in] the_thread The thread.
    525  * @param[in] length The period length.
     525 * @param[in] deadline The deadline in watchdog ticks since boot.
    526526 */
    527527RTEMS_INLINE_ROUTINE void _Scheduler_Release_job(
    528528  Thread_Control *the_thread,
    529   uint32_t        length
     529  uint64_t        deadline
    530530)
    531531{
    532532  const Scheduler_Control *scheduler = _Scheduler_Get( the_thread );
    533533
    534   ( *scheduler->Operations.release_job )( scheduler, the_thread, length );
     534  ( *scheduler->Operations.release_job )( scheduler, the_thread, deadline );
    535535}
    536536
  • cpukit/score/include/rtems/score/watchdogimpl.h

    r7ec66e08 r9a78f8a5  
    340340}
    341341
    342 RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_insert_relative(
     342RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_relative(
    343343  Watchdog_Control *the_watchdog,
    344344  Per_CPU_Control  *cpu,
     
    347347{
    348348  ISR_lock_Context lock_context;
     349  uint64_t expire;
    349350
    350351  _Watchdog_Set_CPU( the_watchdog, cpu );
    351352
    352353  _Watchdog_Per_CPU_acquire_critical( cpu, &lock_context );
     354  expire = cpu->Watchdog.ticks + ticks;
    353355  _Watchdog_Insert(
    354356    &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
    355357    the_watchdog,
    356     cpu->Watchdog.ticks + ticks
     358    expire
    357359  );
    358360  _Watchdog_Per_CPU_release_critical( cpu, &lock_context );
     361
     362  return expire;
    359363}
    360364
  • cpukit/score/src/schedulercbsreleasejob.c

    r7ec66e08 r9a78f8a5  
    2525  const Scheduler_Control *scheduler,
    2626  Thread_Control          *the_thread,
    27   uint32_t                 deadline
     27  uint64_t                 deadline
    2828)
    2929{
  • cpukit/score/src/schedulerdefaultreleasejob.c

    r7ec66e08 r9a78f8a5  
    2525  const Scheduler_Control *scheduler,
    2626  Thread_Control          *the_thread,
    27   uint32_t                 deadline
     27  uint64_t                 deadline
    2828)
    2929{
    30   ( void ) scheduler;
    31   ( void ) the_thread;
    32   ( void ) deadline;
     30  (void) scheduler;
     31  (void) the_thread;
     32  (void) deadline;
    3333}
  • cpukit/score/src/scheduleredfreleasejob.c

    r7ec66e08 r9a78f8a5  
    2626  const Scheduler_Control *scheduler,
    2727  Thread_Control          *the_thread,
    28   uint32_t                 deadline
     28  uint64_t                 deadline
    2929)
    3030{
     
    3636  if (deadline) {
    3737    /* Initializing or shifting deadline. */
    38     new_priority = (_Watchdog_Ticks_since_boot + deadline)
    39                    & ~SCHEDULER_EDF_PRIO_MSB;
     38    new_priority = (uint32_t) deadline & ~SCHEDULER_EDF_PRIO_MSB;
    4039  }
    4140  else {
Note: See TracChangeset for help on using the changeset viewer.