Changes in src/tests/prodcons.c [9f865d1:6c7b1e7]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/prodcons.c
r9f865d1 r6c7b1e7 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 18:01:19201713 // Update Count : 4 112 // Last Modified On : Mon Oct 30 23:06:05 2017 13 // Update Count : 42 14 14 // 15 15 16 16 #include <fstream> 17 17 #include <coroutine> 18 #include <stdlib> // rand 4818 #include <stdlib> // random 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 48( 100 );33 int p2 = rand 48( 100 );32 int p1 = random( 100 ); 33 int p2 = random( 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 48seed( /* getpid() */ 103 ); // fixed seed for testing92 random_seed( /* 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.