Changeset fc59b580


Ignore:
Timestamp:
Apr 14, 2021, 4:40:19 PM (4 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:
a017ee7
Parents:
6a9b12b
Message:

Clusters now keep track of the active processors as well

Location:
libcfa/src/concurrency
Files:
3 edited

Legend:

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

    r6a9b12b rfc59b580  
    659659                this.idle++;
    660660                /* paranoid */ verify( this.idle <= this.total );
    661 
     661                remove(proc);
    662662                insert_first(this.idles, proc);
    663663        unlock( this );
     
    670670                this.idle--;
    671671                /* paranoid */ verify( this.idle >= 0 );
    672 
    673672                remove(proc);
     673                insert_last(this.actives, proc);
    674674        unlock( this );
    675675        /* paranoid */ verify( ! __preemption_enabled() );
  • libcfa/src/concurrency/kernel.hfa

    r6a9b12b rfc59b580  
    192192        // List of idle processors
    193193        dlist(processor, processor) idles;
     194
     195        // List of active processors
     196        dlist(processor, processor) actives;
    194197};
    195198
  • libcfa/src/concurrency/kernel/startup.cfa

    r6a9b12b rfc59b580  
    492492        uint_fast32_t last_size = ready_mutate_register((__processor_id_t*)&this);
    493493                int target = this.cltr->procs.total += 1u;
     494                insert_last(this.cltr->procs.actives, this);
    494495
    495496                // Adjust the ready queue size
     
    507508        uint_fast32_t last_size = ready_mutate_lock();
    508509                int target = this.cltr->procs.total -= 1u;
     510                remove(this);
    509511
    510512                // Adjust the ready queue size
Note: See TracChangeset for help on using the changeset viewer.