Changeset 1240aade in rtems for cpukit/rtems
- Timestamp:
- Jan 24, 2017, 1:37:42 PM (3 years ago)
- 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)
- Location:
- cpukit/rtems
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/rtems/include/rtems/rtems/ratemonimpl.h
r6af2221 r1240aade 118 118 ); 119 119 120 /**121 * @brief Renew the watchdog deadline122 *123 * This routine is prepared for the watchdog timeout to renew its deadline124 * without releasing jobs.125 */126 void _Rate_monotonic_Renew_deadline(127 Rate_monotonic_Control *the_period,128 Thread_Control *owner,129 ISR_lock_Context *lock_context130 );131 132 120 void _Rate_monotonic_Restart( 133 121 Rate_monotonic_Control *the_period, -
cpukit/rtems/src/ratemonperiod.c
r6af2221 r1240aade 119 119 _Thread_Priority_update( &queue_context ); 120 120 _Thread_Dispatch_enable( cpu_self ); 121 }122 123 void _Rate_monotonic_Renew_deadline(124 Rate_monotonic_Control *the_period,125 Thread_Control *owner,126 ISR_lock_Context *lock_context127 )128 {129 Per_CPU_Control *cpu_self;130 uint64_t deadline;131 132 cpu_self = _Thread_Dispatch_disable_critical( lock_context );133 _Rate_monotonic_Release( owner, lock_context );134 135 _ISR_lock_ISR_disable( lock_context );136 deadline = _Watchdog_Per_CPU_insert_relative(137 &the_period->Timer,138 cpu_self,139 the_period->next_length140 );141 the_period->latest_deadline = deadline;142 _ISR_lock_ISR_enable( lock_context );143 _Thread_Dispatch_enable( cpu_self );144 145 121 } 146 122 -
cpukit/rtems/src/ratemontimeout.c
r6af2221 r1240aade 22 22 23 23 #include <rtems/rtems/ratemonimpl.h> 24 25 static 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 } 24 45 25 46 void _Rate_monotonic_Timeout( Watchdog_Control *the_watchdog ) … … 65 86 } 66 87 } else { 67 /*68 * If the watchdog is timeout, it means there is an additional postponed69 * 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 the71 * other higher priority tasks.72 */73 the_period->postponed_jobs += 1;74 the_period->state = RATE_MONOTONIC_EXPIRED;75 88 _Rate_monotonic_Renew_deadline( the_period, owner, &lock_context ); 76 89 }
Note: See TracChangeset
for help on using the changeset viewer.