Changeset 4ee36bf0 for src/tests/sched-int-wait.c
- Timestamp:
- Nov 8, 2017, 2:50:35 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 049ead9
- Parents:
- 136ccd7 (diff), e35f30a (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/tests/sched-int-wait.c
r136ccd7 r4ee36bf0 41 41 //---------------------------------------------------------------------------------------------------- 42 42 // Tools 43 void signal( condition *cond, global_t & mutex a, global_t & mutex b ) {43 void signal( condition & cond, global_t & mutex a, global_t & mutex b ) { 44 44 signal( cond ); 45 45 } 46 46 47 void signal( condition *cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {47 void signal( condition & cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) { 48 48 signal( cond ); 49 49 } 50 50 51 void wait( condition *cond, global_t & mutex a, global_t & mutex b ) {51 void wait( condition & cond, global_t & mutex a, global_t & mutex b ) { 52 52 wait( cond ); 53 53 } 54 54 55 void wait( condition *cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {55 void wait( condition & cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) { 56 56 wait( cond ); 57 57 } … … 65 65 switch( action ) { 66 66 case 0: 67 signal( &condABC, globalA, globalB, globalC );67 signal( condABC, globalA, globalB, globalC ); 68 68 break; 69 69 case 1: 70 signal( &condAB , globalA, globalB );70 signal( condAB , globalA, globalB ); 71 71 break; 72 72 case 2: 73 signal( &condBC , globalB, globalC );73 signal( condBC , globalB, globalC ); 74 74 break; 75 75 case 3: 76 signal( &condAC , globalA, globalC );76 signal( condAC , globalA, globalC ); 77 77 break; 78 78 default: … … 88 88 void main( WaiterABC & this ) { 89 89 for( int i = 0; i < N; i++ ) { 90 wait( &condABC, globalA, globalB, globalC );90 wait( condABC, globalA, globalB, globalC ); 91 91 } 92 92 … … 98 98 void main( WaiterAB & this ) { 99 99 for( int i = 0; i < N; i++ ) { 100 wait( &condAB , globalA, globalB );100 wait( condAB , globalA, globalB ); 101 101 } 102 102 … … 108 108 void main( WaiterAC & this ) { 109 109 for( int i = 0; i < N; i++ ) { 110 wait( &condAC , globalA, globalC );110 wait( condAC , globalA, globalC ); 111 111 } 112 112 … … 118 118 void main( WaiterBC & this ) { 119 119 for( int i = 0; i < N; i++ ) { 120 wait( &condBC , globalB, globalC );120 wait( condBC , globalB, globalC ); 121 121 } 122 122
Note: See TracChangeset
for help on using the changeset viewer.