Ignore:
Timestamp:
Jan 10, 2022, 7:11:25 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
9b33337
Parents:
418d31ac
Message:

Tentative optimization for wake-one

File:
1 edited

Legend:

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

    r418d31ac r5b7a3662  
    736736
    737737        // Check if there is a sleeping processor
    738         int fd = __atomic_load_n(&this->procs.fd, __ATOMIC_SEQ_CST);
     738        // int fd = __atomic_load_n(&this->procs.fd, __ATOMIC_SEQ_CST);
     739        int fd = 0;
     740        if( __atomic_load_n(&this->procs.fd, __ATOMIC_SEQ_CST) != 0 ) {
     741                fd = __atomic_exchange_n(&this->procs.fd, 0, __ATOMIC_RELAXED);
     742        }
    739743
    740744        // If no one is sleeping, we are done
Note: See TracChangeset for help on using the changeset viewer.