Changeset 75965a6
- Timestamp:
- Jan 13, 2022, 9:49:46 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 86530e7
- Parents:
- 5d1ebb9
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified benchmark/readyQ/churn.cfa ¶
r5d1ebb9 r75965a6 21 21 wait( sem ); 22 22 for() { 23 uint 64_t r = thread_rand();23 uint32_t r = prng(); 24 24 bench_sem * next = __atomic_exchange_n(&spots[r % spot_cnt], &sem, __ATOMIC_SEQ_CST); 25 25 if(next) post( *next ); -
TabularUnified benchmark/readyQ/locality.cfa ¶
r5d1ebb9 r75965a6 128 128 __attribute__((noinline)) void work(MyData & data, size_t cnt_, uint64_t & state) { 129 129 for (cnt_) { 130 access(data, __xorshift64(state));130 access(data, xorshift_13_7_17(state)); 131 131 } 132 132 } 133 133 134 134 void main(MyThread & this) { 135 uint64_t state = thread_rand();135 uint64_t state = prng(); 136 136 137 137 // Wait for start … … 144 144 145 145 // Wait on a random spot 146 uint64_t idx = __xorshift64(state) % this.spots.len;146 uint64_t idx = xorshift_13_7_17(state) % this.spots.len; 147 147 bool closed = put(*this.spots.ptr[idx], this, this.data, this.share); 148 148 -
TabularUnified libcfa/src/concurrency/clib/cfathread.cfa ¶
r5d1ebb9 r75965a6 22 22 #include "thread.hfa" 23 23 #include "time.hfa" 24 #include "stdlib.hfa" 24 25 25 26 #include "cfathread.h" … … 195 196 eevent.data.u64 = (uint64_t)active_thread(); 196 197 197 int id = thread_rand() % poller_cnt;198 int id = prng() % poller_cnt; 198 199 if(0 != epoll_ctl(poller_fds[id], EPOLL_CTL_ADD, fd, &eevent)) 199 200 {
Note: See TracChangeset
for help on using the changeset viewer.