Ignore:
Timestamp:
May 5, 2020, 10:51:15 AM (18 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
b6f2b21
Parents:
61dd73d (diff), d3ab183 (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

    r61dd73d rf90d10f  
    8484// Get next expired node
    8585static inline alarm_node_t * get_expired( alarm_list_t * alarms, Time currtime ) {
    86         if( !alarms->head ) return 0p;                                          // If no alarms return null
    87         if( alarms->head->alarm >= currtime ) return 0p;        // If alarms head not expired return null
     86        if( ! & (*alarms)`first ) return 0p;                                            // If no alarms return null
     87        if( (*alarms)`first.alarm >= currtime ) return 0p;      // If alarms head not expired return null
    8888        return pop(alarms);                                                                     // Otherwise just pop head
    8989}
     
    120120
    121121        // If there are still alarms pending, reset the timer
    122         if( alarms->head ) {
     122        if( & (*alarms)`first ) {
    123123                __cfaabi_dbg_print_buffer_decl( " KERNEL: @%ju(%ju) resetting alarm to %ju.\n", currtime.tv, __kernel_get_time().tv, (alarms->head->alarm - currtime).tv);
    124                 Duration delta = alarms->head->alarm - currtime;
    125                 Duration caped = max(delta, 50`us);
     124                Duration delta = (*alarms)`first.alarm - currtime;
     125                Duration capped = max(delta, 50`us);
    126126                // itimerval tim  = { caped };
    127127                // __cfaabi_dbg_print_buffer_local( "    Values are %lu, %lu, %lu %lu.\n", delta.tv, caped.tv, tim.it_value.tv_sec, tim.it_value.tv_usec);
    128128
    129                 __kernel_set_timer( caped );
     129                __kernel_set_timer( capped );
    130130        }
    131131}
Note: See TracChangeset for help on using the changeset viewer.