Changeset 343d10e for libcfa/src
- Timestamp:
- Aug 11, 2020, 5:38:42 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7ff3e522, a77257be
- Parents:
- 0d070ca
- Location:
- libcfa/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/Makefile.am
r0d070ca r343d10e 44 44 45 45 headers = common.hfa fstream.hfa heap.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa \ 46 time.hfa stdlib.hfa memory.hfaparseargs.hfa \46 time.hfa stdlib.hfa parseargs.hfa \ 47 47 containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa 48 48 -
libcfa/src/concurrency/ready_queue.cfa
r0d070ca r343d10e 419 419 // Actually pop the list 420 420 struct $thread * thrd; 421 bool emptied; 422 [thrd, emptied] = pop(lane); 421 thrd = pop(lane); 423 422 424 423 /* paranoid */ verify(thrd); … … 457 456 if(head(lane)->link.next == thrd) { 458 457 $thread * pthrd; 459 bool emptied; 460 [pthrd, emptied] = pop(lane); 458 pthrd = pop(lane); 461 459 462 460 /* paranoid */ verify( pthrd == thrd ); … … 608 606 while(!is_empty(lanes.data[idx])) { 609 607 struct $thread * thrd; 610 __attribute__((unused)) bool _; 611 [thrd, _] = pop(lanes.data[idx]); 608 thrd = pop(lanes.data[idx]); 612 609 613 610 push(cltr, thrd); -
libcfa/src/concurrency/ready_subqueue.hfa
r0d070ca r343d10e 144 144 // returns popped 145 145 // returns true of lane was empty before push, false otherwise 146 [$thread *, bool]pop(__intrusive_lane_t & this) {146 $thread * pop(__intrusive_lane_t & this) { 147 147 /* paranoid */ verify(this.lock); 148 148 /* paranoid */ verify(this.before.link.ts != 0ul); … … 162 162 head->link.next = next; 163 163 next->link.prev = head; 164 node->link.[next, prev] = 0p; 164 node->link.next = 0p; 165 node->link.prev = 0p; 165 166 166 167 // Update head time stamp … … 180 181 /* paranoid */ verify(tail(this)->link.prev == head(this)); 181 182 /* paranoid */ verify(head(this)->link.next == tail(this)); 182 return [node, true];183 return node; 183 184 } 184 185 else { … … 187 188 /* paranoid */ verify(head(this)->link.next != tail(this)); 188 189 /* paranoid */ verify(this.before.link.ts != 0); 189 return [node, false];190 return node; 190 191 } 191 192 }
Note: See TracChangeset
for help on using the changeset viewer.