Ignore:
Timestamp:
Jan 24, 2017, 1:37:42 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
625bd6a
Parents:
6af2221
git-author:
Sebastian Huber <sebastian.huber@…> (01/24/17 13:37:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/24/17 13:44:37)
Message:

rtems: Fix _Rate_monotonic_Renew_deadline()

Make _Rate_monotonic_Renew_deadline() static and use proper locking in SMP
configurations.

Update #2795.

File:
1 edited

Legend:

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

    r6af2221 r1240aade  
    2222
    2323#include <rtems/rtems/ratemonimpl.h>
     24
     25static void _Rate_monotonic_Renew_deadline(
     26  Rate_monotonic_Control *the_period,
     27  Thread_Control         *owner,
     28  ISR_lock_Context       *lock_context
     29)
     30{
     31  uint64_t deadline;
     32
     33  ++the_period->postponed_jobs;
     34  the_period->state = RATE_MONOTONIC_EXPIRED;
     35
     36  deadline = _Watchdog_Per_CPU_insert_relative(
     37    &the_period->Timer,
     38    _Per_CPU_Get(),
     39    the_period->next_length
     40  );
     41  the_period->latest_deadline = deadline;
     42
     43  _Rate_monotonic_Release( the_period, lock_context );
     44}
    2445
    2546void _Rate_monotonic_Timeout( Watchdog_Control *the_watchdog )
     
    6586    }
    6687  } else {
    67     /*
    68      * If the watchdog is timeout, it means there is an additional postponed
    69      * job in the next period but it is not available to release now:
    70      * Either the current task is still executed, or it is preemptive by the
    71      * other higher priority tasks.
    72      */
    73     the_period->postponed_jobs += 1;
    74     the_period->state = RATE_MONOTONIC_EXPIRED;
    7588    _Rate_monotonic_Renew_deadline( the_period, owner, &lock_context );
    7689  }
Note: See TracChangeset for help on using the changeset viewer.