Changeset 34dcc78c for libcfa/src/bits
- Timestamp:
- Dec 3, 2020, 9:19:55 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:
- a9a1d06
- Parents:
- 7b2a786
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/multi_list.cfa
r7b2a786 r34dcc78c 57 57 } 58 58 59 // Stack(TaskDL) fredStack; 60 // for ( Lnth ) { 61 // Task & task = *new(); // create task node 62 // push( fredStack, task.clusterRef ); // insert on lists in opposite directions 63 // } 59 // Re-purpose Seqable as Colable 60 Stack(TaskDL) mutexStack; 61 for ( Lnth ) { 62 Task & task = *new(); // create task node 63 push( mutexStack, task.clusterRef ); // insert on lists in opposite directions 64 } 65 for ( StackIter(TaskDL) iter = { mutexStack }; (StackIter(TaskDL) &)iter >> dl; ) { // cast required 66 sout | &task( dl ); 67 } 68 sout | nl; 69 for ( Lnth ) { // remove nodes from readyList and safe to delete nodes 70 delete( &task( pop( mutexStack ) ) ); 71 } 64 72 }
Note: See TracChangeset
for help on using the changeset viewer.