Changes in src/tests/sched-ext.c [6c7b1e7:d67cdb7]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/sched-ext.c
r6c7b1e7 rd67cdb7 26 26 volatile bool done; 27 27 28 unsigned rand10() { 29 return (unsigned)rand48() % 10; 30 } 31 28 32 //---------------------------------------------------------------------------------------------------- 29 33 // Acceptor … … 32 36 void do_wait( global_t * mutex a ) { 33 37 sout | "Waiting to accept" | endl; 34 yield( rand om( 10) );38 yield( rand10() ); 35 39 36 40 sout | "Accepting" | endl; … … 44 48 45 49 sout | "Accepted" | endl; 46 yield( rand om( 10) );50 yield( rand10() ); 47 51 } 48 52 … … 64 68 void main( Acceptee* this ) { 65 69 while( !done ) { 66 yield( rand om( 10) );70 yield( rand10() ); 67 71 do_notify( &globalA ); 68 yield( rand om( 10) );72 yield( rand10() ); 69 73 } 70 74 } … … 74 78 int main(int argc, char* argv[]) { 75 79 done = false; 76 rand om_seed( time( NULL ) );80 rand48seed( time( NULL ) ); 77 81 printf("%p\n", &globalA); 78 82 sout | "Starting" | endl;
Note:
See TracChangeset
for help on using the changeset viewer.