Changeset 9cac0da for libcfa/src
- Timestamp:
- May 19, 2021, 1:34:11 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b808625
- Parents:
- d36bac7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/ready_queue.cfa
rd36bac7 r9cac0da 409 409 unsigned target = proc->rdq.target; 410 410 proc->rdq.target = -1u; 411 if(lanes.tscs[target].tv < proc->rdq.cutoff) { 411 const unsigned long long bias = 0; //2_500_000_000; 412 const unsigned long long cutoff = proc->rdq.cutoff > bias ? proc->rdq.cutoff - bias : proc->rdq.cutoff; 413 if(lanes.tscs[target].tv < cutoff && ts(lanes.data[target]) < cutoff) { 412 414 $thread * t = try_pop(cltr, target __STATS(, __tls_stats()->ready.pop.help)); 413 415 if(t) return t; … … 571 573 lanes.tscs = alloc(lanes.count, lanes.tscs`realloc); 572 574 for(i; lanes.count) { 573 lanes.tscs[i].tv = ts(lanes.data[i]); 575 unsigned long long tsc = ts(lanes.data[i]); 576 lanes.tscs[i].tv = tsc != 0 ? tsc : rdtscl(); 574 577 } 575 578 #endif
Note: See TracChangeset
for help on using the changeset viewer.