Ignore:
Timestamp:
Jan 12, 2022, 9:30:48 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
42daeb4
Parents:
1959528 (diff), 07a1e7a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Peter A. Buhr <pabuhr@…> (01/12/22 18:35:04)
git-committer:
Peter A. Buhr <pabuhr@…> (01/12/22 21:30:48)
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
libcfa/src/concurrency
Files:
4 edited

Legend:

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

    r1959528 r00f5fde  
    548548                        /* paranoid */ verify( proc == __cfaabi_tls.this_processor );
    549549                        /* paranoid */ verify( ! __preemption_enabled() );
     550
     551                        return true;
    550552                }
    551553        #endif
  • libcfa/src/concurrency/kernel.cfa

    r1959528 r00f5fde  
    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
  • libcfa/src/concurrency/ready_queue.cfa

    r1959528 r00f5fde  
    681681        // Actually pop the list
    682682        struct thread$ * thrd;
    683         unsigned long long tsc_before = ts(lane);
     683        #if defined(USE_WORK_STEALING) || defined(USE_CPU_WORK_STEALING)
     684                unsigned long long tsc_before = ts(lane);
     685        #endif
    684686        unsigned long long tsv;
    685687        [thrd, tsv] = pop(lane);
  • libcfa/src/concurrency/thread.cfa

    r1959528 r00f5fde  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 12 18:28:18 2022
    13 // Update Count     : 35
     12// Last Modified On : Wed Jan 12 18:46:48 2022
     13// Update Count     : 36
    1414//
    1515
     
    197197} // LCG
    198198
    199 void set_seed( uint32_t seed ) { active_thread()->random_state = seed; __global_random_seed = seed; }
     199void set_seed( uint32_t seed ) {
     200        active_thread()->random_state = __global_random_seed = seed;
     201        GENERATOR( active_thread()->random_state );
     202} // set_seed
    200203uint32_t prng( void ) { return GENERATOR( active_thread()->random_state ); } // [0,UINT_MAX]
    201204
Note: See TracChangeset for help on using the changeset viewer.