Ignore:
Timestamp:
Apr 22, 2020, 5:29:20 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b8c1307
Parents:
5d7e049
Message:

Some small fixes for the io code

File:
1 edited

Legend:

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

    r5d7e049 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.