- File:
-
- 1 edited
-
libcfa/src/concurrency/preemption.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/preemption.cfa
r1756e08 rb443db0 104 104 static inline alarm_node_t * get_expired( alarm_list_t * alarms, Time currtime ) { 105 105 if( ! & (*alarms)`first ) return 0p; // If no alarms return null 106 if( (*alarms)`first. deadline>= currtime ) return 0p; // If alarms head not expired return null106 if( (*alarms)`first.timeval >= currtime ) return 0p; // If alarms head not expired return null 107 107 return pop(alarms); // Otherwise just pop head 108 108 } … … 140 140 if( period > 0 ) { 141 141 __cfadbg_print_buffer_local( preemption, " KERNEL: alarm period is %lu.\n", period`ns ); 142 node-> deadline= currtime + period; // Alarm is periodic, add currtime to it (used cached current time)142 node->timeval = currtime + period; // Alarm is periodic, add currtime to it (used cached current time) 143 143 insert( alarms, node ); // Reinsert the node for the next time it triggers 144 144 } … … 147 147 // If there are still alarms pending, reset the timer 148 148 if( & (*alarms)`first ) { 149 Duration delta = (*alarms)`first. deadline- currtime;149 Duration delta = (*alarms)`first.timeval - currtime; 150 150 __kernel_set_timer( delta ); 151 151 }
Note:
See TracChangeset
for help on using the changeset viewer.