Ignore:
File:
1 edited

Legend:

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

    r7d0ebd0 r5b7a3662  
    554554        /* paranoid */ verify( 0x0D15EA5E0D15EA5Ep == thrd->canary );
    555555
    556         const bool local = thrd->state != Start;
    557556        if (thrd->preempted == __NO_PREEMPTION) thrd->state = Ready;
    558557
     
    737736
    738737        // Check if there is a sleeping processor
    739         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        }
    740743
    741744        // If no one is sleeping, we are done
Note: See TracChangeset for help on using the changeset viewer.