Ignore:
Timestamp:
Apr 14, 2021, 3:41:06 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:
a7504db5
Parents:
634a5c2
Message:

Minor changes so using the global RWlock is more concise.

File:
1 edited

Legend:

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

    r634a5c2 ra33c113  
    493493        unlock( this.cltr->idles );
    494494
    495         id = doregister((__processor_id_t*)&this);
    496 
    497         // Lock the RWlock so no-one pushes/pops while we are changing the queue
    498         uint_fast32_t last_size = ready_mutate_lock();
     495        // Register and Lock the RWlock so no-one pushes/pops while we are changing the queue
     496        uint_fast32_t last_size = ready_mutate_register((__processor_id_t*)&this);
    499497
    500498                // Adjust the ready queue size
     
    519517                ready_queue_shrink( this.cltr, target );
    520518
    521         // Unlock the RWlock
    522         ready_mutate_unlock( last_size );
    523 
    524         // Finally we don't need the read_lock any more
    525         unregister((__processor_id_t*)&this);
     519        // Unlock the RWlock and unregister: we don't need the read_lock any more
     520        ready_mutate_unregister((__processor_id_t*)&this, last_size );
    526521
    527522        close(this.idle);
Note: See TracChangeset for help on using the changeset viewer.