Ignore:
File:
1 edited

Legend:

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

    r2d8f7b0 r038be32  
    257257        ready_queue{};
    258258        ready_queue_lock{};
     259
     260        #if !defined(__CFA_NO_STATISTICS__)
     261                print_stats = false;
     262        #endif
    259263
    260264        procs{ __get };
     
    10041008}
    10051009
     1010bool V(semaphore & this, unsigned diff) with( this ) {
     1011        $thread * thrd = 0p;
     1012        lock( lock __cfaabi_dbg_ctx2 );
     1013        int release = max(-count, (int)diff);
     1014        count += diff;
     1015        for(release) {
     1016                unpark( pop_head( waiting ) __cfaabi_dbg_ctx2 );
     1017        }
     1018
     1019        unlock( lock );
     1020
     1021        return thrd != 0p;
     1022}
     1023
    10061024//-----------------------------------------------------------------------------
    10071025// Global Queues
Note: See TracChangeset for help on using the changeset viewer.