Ignore:
Timestamp:
Apr 5, 2021, 3:18:12 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b0904bf
Parents:
c9ec301
Message:

Fix stats so they are correctly tallied when called from outside the cluster.

File:
1 edited

Legend:

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

    rc9ec301 r5cb51502  
    490490                        {
    491491                                /* paranoid */ verify( publicTLS_get(this_proc_id) );
    492                                 bool full = publicTLS_get(this_proc_id)->full_proc;
    493                                 if(full) disable_interrupts();
     492                                disable_interrupts();
    494493
    495494                                /* paranoid */ verify( ! __preemption_enabled() );
     
    500499                                /* paranoid */ verify( ! __preemption_enabled() );
    501500
    502                                 if(full) enable_interrupts( __cfaabi_dbg_ctx );
     501                                enable_interrupts_noPoll();
    503502                                /* paranoid */ verify( publicTLS_get(this_proc_id) );
    504503                        }
     
    609608
    610609        #if !defined(__CFA_NO_STATISTICS__)
    611                 __tls_stats()->ready.sleep.wakes++;
     610                if( kernelTLS().this_stats ) {
     611                        __tls_stats()->ready.sleep.wakes++;
     612                }
     613                else {
     614                        __atomic_fetch_add(&this->stats->ready.sleep.wakes, 1, __ATOMIC_RELAXED);
     615                }
    612616        #endif
    613617
Note: See TracChangeset for help on using the changeset viewer.