- File:
-
- 1 edited
-
tests/concurrent/waitfor/recurse.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/waitfor/recurse.c
r200fcb3 r73abe95 95 95 rand_yield(); 96 96 97 sout | "1st" | nl;97 sout | "1st" | endl; 98 98 99 99 return this.counter < N ? (state_t)this.actions[idx] : (state_t)STOP; … … 123 123 case THIRD : while( !global.ready ) { yield(); } this.state = call3( global, this.idx ); break; 124 124 case LAST : while( !global.ready ) { yield(); } this.state = call4( global, this.idx ); break; 125 case STOP : serr | "This should not happen" | nl;125 case STOP : serr | "This should not happen" | endl; 126 126 } 127 127 } … … 132 132 int main() { 133 133 srandom( time(NULL) ); 134 sout | nlOff; // turn off auto newline 135 sout | "Starting" | nl; 134 sout | "Starting" | endl; 136 135 { 137 136 waiter_t waiters[4] = { … … 143 142 the_threads = waiters; 144 143 } 145 sout | "Stopping" | nl;144 sout | "Stopping" | endl; 146 145 }
Note:
See TracChangeset
for help on using the changeset viewer.