Ignore:
Timestamp:
Jan 18, 2022, 1:06:09 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
21a5bfb7
Parents:
7d0ebd0
Message:

Attempt optim for wake_one

File:
1 edited

Legend:

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

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