Changeset 3c54a71 for src/Concurrency/Waitfor.cc
- Timestamp:
- Jan 16, 2019, 5:06:56 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 266f36d, 273ff10
- Parents:
- af00c45 (diff), c47ca77 (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
-
src/Concurrency/Waitfor.cc
raf00c45 r3c54a71 66 66 void foo() { 67 67 while( true ) { 68 69 acceptable_t acceptables[3]; 70 if( a < 1 ) { 71 acceptables[0].func = f; 72 acceptables[0].mon = a; 73 } 74 acceptables[1].func = g; 75 acceptables[1].mon = a; 76 77 acceptables[2].func = f; 78 acceptables[2].mon = a; 79 acceptables[2].is_dtor = true; 80 81 int ret = waitfor_internal( acceptables, swagl() ); 82 83 switch( ret ) { 84 case 0: 85 { 86 bar(); 68 { 69 acceptable_t acceptables[3]; 70 if( a < 1 ) { 71 acceptables[0].func = f; 72 acceptables[0].mon = a; 87 73 } 88 case 1: 89 { 90 baz(); 74 acceptables[1].func = g; 75 acceptables[1].mon = a; 76 77 acceptables[2].func = f; 78 acceptables[2].mon = a; 79 acceptables[2].is_dtor = true; 80 81 int ret = waitfor_internal( acceptables, swagl() ); 82 83 switch( ret ) { 84 case 0: 85 { 86 bar(); 87 } 88 case 1: 89 { 90 baz(); 91 } 92 case 2: 93 signal(a); 94 { 95 break; 96 } 91 97 } 92 case 2:93 signal(a);94 {95 break;96 }97 98 } 98 99 } … … 555 556 new ConstantExpr( Constant::from_ulong( i++ ) ), 556 557 { 557 clause.statement, 558 new BranchStmt( 559 "", 560 BranchStmt::Break 561 ) 558 new CompoundStmt({ 559 clause.statement, 560 new BranchStmt( 561 "", 562 BranchStmt::Break 563 ) 564 }) 562 565 } 563 566 ) … … 570 573 new ConstantExpr( Constant::from_int( -2 ) ), 571 574 { 572 waitfor->timeout.statement, 573 new BranchStmt( 574 "", 575 BranchStmt::Break 576 ) 575 new CompoundStmt({ 576 waitfor->timeout.statement, 577 new BranchStmt( 578 "", 579 BranchStmt::Break 580 ) 581 }) 577 582 } 578 583 ) … … 585 590 new ConstantExpr( Constant::from_int( -1 ) ), 586 591 { 587 waitfor->orelse.statement, 588 new BranchStmt( 589 "", 590 BranchStmt::Break 591 ) 592 new CompoundStmt({ 593 waitfor->orelse.statement, 594 new BranchStmt( 595 "", 596 BranchStmt::Break 597 ) 598 }) 592 599 } 593 600 )
Note: See TracChangeset
for help on using the changeset viewer.