Ignore:
File:
1 edited

Legend:

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

    r185efe6 r2d8f7b0  
    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                 }
    10399
    104100                // Check if this is a kernel
     
    111107
    112108                // Check if this is a periodic alarm
     109                Duration period = node->period;
    113110                if( period > 0 ) {
    114111                        // __cfaabi_dbg_print_buffer_local( " KERNEL: alarm period is %lu.\n", period.tv );
    115112                        node->alarm = currtime + period;    // Alarm is periodic, add currtime to it (used cached current time)
    116113                        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.