Ignore:
Timestamp:
Apr 23, 2020, 5:53:21 PM (18 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/preemption.cfa

    r40b5417 r2a01c9b  
    9797        while( node = get_expired( alarms, currtime ) ) {
    9898                // __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                }
    99103
    100104                // Check if this is a kernel
     
    107111
    108112                // Check if this is a periodic alarm
    109                 Duration period = node->period;
    110113                if( period > 0 ) {
    111114                        // __cfaabi_dbg_print_buffer_local( " KERNEL: alarm period is %lu.\n", period.tv );
    112115                        node->alarm = currtime + period;    // Alarm is periodic, add currtime to it (used cached current time)
    113116                        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 pending
    117117                }
    118118        }
Note: See TracChangeset for help on using the changeset viewer.