Changeset 00f5fde for libcfa/src/concurrency
- Timestamp:
- Jan 12, 2022, 9:30:48 PM (4 years ago)
- 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)
- Location:
- libcfa/src/concurrency
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
r1959528 r00f5fde 548 548 /* paranoid */ verify( proc == __cfaabi_tls.this_processor ); 549 549 /* paranoid */ verify( ! __preemption_enabled() ); 550 551 return true; 550 552 } 551 553 #endif -
libcfa/src/concurrency/kernel.cfa
r1959528 r00f5fde 554 554 /* paranoid */ verify( 0x0D15EA5E0D15EA5Ep == thrd->canary ); 555 555 556 const bool local = thrd->state != Start;557 556 if (thrd->preempted == __NO_PREEMPTION) thrd->state = Ready; 558 557 … … 737 736 738 737 // 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 } 740 743 741 744 // If no one is sleeping, we are done -
libcfa/src/concurrency/ready_queue.cfa
r1959528 r00f5fde 681 681 // Actually pop the list 682 682 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 684 686 unsigned long long tsv; 685 687 [thrd, tsv] = pop(lane); -
libcfa/src/concurrency/thread.cfa
r1959528 r00f5fde 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jan 12 18: 28:18 202213 // Update Count : 3 512 // Last Modified On : Wed Jan 12 18:46:48 2022 13 // Update Count : 36 14 14 // 15 15 … … 197 197 } // LCG 198 198 199 void set_seed( uint32_t seed ) { active_thread()->random_state = seed; __global_random_seed = seed; } 199 void set_seed( uint32_t seed ) { 200 active_thread()->random_state = __global_random_seed = seed; 201 GENERATOR( active_thread()->random_state ); 202 } // set_seed 200 203 uint32_t prng( void ) { return GENERATOR( active_thread()->random_state ); } // [0,UINT_MAX] 201 204
Note:
See TracChangeset
for help on using the changeset viewer.