Changeset 2a01c9b for libcfa/src/concurrency/preemption.cfa
- Timestamp:
- Apr 23, 2020, 5:53:21 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 9edf835, cefc59f
- Parents:
- 40b5417 (diff), 8962722 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/preemption.cfa
r40b5417 r2a01c9b 97 97 while( node = get_expired( alarms, currtime ) ) { 98 98 // __cfaabi_dbg_print_buffer_decl( " KERNEL: preemption tick.\n" ); 99 Duration period = node->period; 100 if( period == 0) { 101 node->set = false; // Node is one-shot, just mark it as not pending 102 } 99 103 100 104 // Check if this is a kernel … … 107 111 108 112 // Check if this is a periodic alarm 109 Duration period = node->period;110 113 if( period > 0 ) { 111 114 // __cfaabi_dbg_print_buffer_local( " KERNEL: alarm period is %lu.\n", period.tv ); 112 115 node->alarm = currtime + period; // Alarm is periodic, add currtime to it (used cached current time) 113 116 insert( alarms, node ); // Reinsert the node for the next time it triggers 114 }115 else {116 node->set = false; // Node is one-shot, just mark it as not pending117 117 } 118 118 }
Note: See TracChangeset
for help on using the changeset viewer.