Changes in src/tests/prodcons.c [6c7b1e7:9f865d1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/prodcons.c
r6c7b1e7 r9f865d1 10 10 // Created On : Mon Sep 18 12:23:39 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Oct 30 23:06:05201713 // Update Count : 4 212 // Last Modified On : Mon Oct 30 18:01:19 2017 13 // Update Count : 41 14 14 // 15 15 16 16 #include <fstream> 17 17 #include <coroutine> 18 #include <stdlib> // rand om18 #include <stdlib> // rand48 19 19 #include <unistd.h> // getpid 20 20 … … 30 30 // 1st resume starts here 31 31 for ( int i = 0; i < prod.N; i += 1 ) { 32 int p1 = rand om( 100 );33 int p2 = rand om( 100 );32 int p1 = rand48( 100 ); 33 int p2 = rand48( 100 ); 34 34 sout | p1 | " " | p2 | endl; 35 35 int status = delivery( *prod.c, p1, p2 ); … … 90 90 Prod prod; 91 91 Cons cons = { prod }; 92 rand om_seed( /* getpid() */ 103 ); // fixed seed for testing92 rand48seed( /* getpid() */ 103 ); // fixed seed for testing 93 93 start( prod, 5, cons ); 94 94 sout | "main stops" | endl;
Note: See TracChangeset
for help on using the changeset viewer.