Changeset 50f6afb for libcfa/src/concurrency/ready_queue.cfa
- Timestamp:
- Apr 24, 2021, 11:32:49 AM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 424dfc4, 986cb99
- Parents:
- fec63b2 (diff), 8edbe40 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/ready_queue.cfa
rfec63b2 r50f6afb 413 413 unsigned it2 = proc->rdq.itr + 1; 414 414 unsigned idx1 = proc->rdq.id + (it1 % READYQ_SHARD_FACTOR); 415 unsigned idx2 = proc->rdq.id + (it 1% READYQ_SHARD_FACTOR);415 unsigned idx2 = proc->rdq.id + (it2 % READYQ_SHARD_FACTOR); 416 416 unsigned long long tsc1 = ts(lanes.data[idx1]); 417 417 unsigned long long tsc2 = ts(lanes.data[idx2]); 418 418 proc->rdq.cutoff = min(tsc1, tsc2); 419 } 420 else if(lanes.tscs[proc->rdq.target].tv < proc->rdq.cutoff) { 421 $thread * t = try_pop(cltr, proc->rdq.target __STATS(, __tls_stats()->ready.pop.help)); 419 if(proc->rdq.cutoff == 0) proc->rdq.cutoff = -1ull; 420 } 421 else { 422 unsigned target = proc->rdq.target; 422 423 proc->rdq.target = -1u; 423 if(t) return t; 424 if(lanes.tscs[target].tv < proc->rdq.cutoff) { 425 $thread * t = try_pop(cltr, target __STATS(, __tls_stats()->ready.pop.help)); 426 if(t) return t; 427 } 424 428 } 425 429
Note: See TracChangeset
for help on using the changeset viewer.