Ignore:
Timestamp:
Apr 14, 2021, 4:07:18 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:
6a9b12b
Parents:
a33c113
Message:

Changed how the cluster idle lock is implemented to be covered by the global RW-lock

File:
1 edited

Legend:

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

    ra33c113 ra7504db  
    489489        #endif
    490490
    491         lock( this.cltr->idles );
    492                 int target = this.cltr->idles.total += 1u;
    493         unlock( this.cltr->idles );
    494 
    495491        // Register and Lock the RWlock so no-one pushes/pops while we are changing the queue
    496492        uint_fast32_t last_size = ready_mutate_register((__processor_id_t*)&this);
     493                int target = this.cltr->idles.total += 1u;
    497494
    498495                // Adjust the ready queue size
     
    507504// Not a ctor, it just preps the destruction but should not destroy members
    508505static void deinit(processor & this) {
    509         lock( this.cltr->idles );
    510                 int target = this.cltr->idles.total -= 1u;
    511         unlock( this.cltr->idles );
    512 
    513506        // Lock the RWlock so no-one pushes/pops while we are changing the queue
    514507        uint_fast32_t last_size = ready_mutate_lock();
     508                int target = this.cltr->idles.total -= 1u;
    515509
    516510                // Adjust the ready queue size
Note: See TracChangeset for help on using the changeset viewer.