Changeset 4f649cb for libcfa/src/bits/multi_list.cfa
- Timestamp:
- Dec 4, 2020, 9:56:43 AM (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:
- a32cbac2
- Parents:
- f7386f7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/multi_list.cfa
rf7386f7 r4f649cb 62 62 sout | nlOff; 63 63 for ( over( sqiter, clustList ); sqiter >> dl; ) { // print lists 64 Task & fred = task( dl ); 65 sout | fred.id; // works 66 sout | task( dl ).id; // does not work 64 Task & tmp = task( dl ); sout | tmp.id; 65 // sout | task( dl ).id; 67 66 } 68 67 sout | nl; 69 68 for ( over( sqiter, readyList ); sqiter >> dl; ) { 70 sout | &task( dl ); 69 Task & tmp = task( dl ); sout | tmp.id; 70 // sout | task( dl ).id; 71 71 } 72 72 sout | nl; 73 73 for ( QueueIter(TaskSL) qiter = { mutexList }; qiter >> sl; ) { // print lists 74 sout | &task( sl ); 74 Task & tmp = task( sl ); sout | tmp.id; 75 // sout | task( sl ).id; 75 76 } 76 77 sout | nl; 77 for ( Lnth ) { // remove nodes from clustList 78 for ( Lnth ) { // remove nodes from clustList. mutexList 78 79 dropHead( clustList ); 79 80 drop( mutexList ); 80 81 } 82 // Simultaneous deletion only safe if all nodes are traversed in same direction. 81 83 for ( Lnth ) { // remove nodes from readyList and safe to delete nodes 82 84 delete( &task( dropHead( readyList ) ) ); … … 90 92 } 91 93 for ( StackIter(TaskDL) stiter = { mutexStack }; stiter >> dl; ) { 92 sout | &task( dl ); 94 Task & tmp = task( dl ); sout | tmp.id; 95 // sout | task( dl ).id; 93 96 } 94 97 sout | nl;
Note: See TracChangeset
for help on using the changeset viewer.