Ignore:
File:
1 edited

Legend:

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

    r2d8f7b0 r185efe6  
    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.