Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/prodcons.c

    r9f865d1 r6c7b1e7  
    1010// Created On       : Mon Sep 18 12:23:39 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Oct 30 18:01:19 2017
    13 // Update Count     : 41
     12// Last Modified On : Mon Oct 30 23:06:05 2017
     13// Update Count     : 42
    1414//
    1515
    1616#include <fstream>
    1717#include <coroutine>
    18 #include <stdlib>                                                                               // rand48
     18#include <stdlib>                                                                               // random
    1919#include <unistd.h>                                                                             // getpid
    2020
     
    3030        // 1st resume starts here
    3131        for ( int i = 0; i < prod.N; i += 1 ) {
    32                 int p1 = rand48( 100 );
    33                 int p2 = rand48( 100 );
     32                int p1 = random( 100 );
     33                int p2 = random( 100 );
    3434                sout | p1 | " " | p2 | endl;
    3535                int status = delivery( *prod.c, p1, p2 );
     
    9090        Prod prod;
    9191        Cons cons = { prod };
    92         rand48seed( /* getpid() */ 103 );                                       // fixed seed for testing
     92        random_seed( /* getpid() */ 103 );                                      // fixed seed for testing
    9393        start( prod, 5, cons );
    9494        sout | "main stops" | endl;
Note: See TracChangeset for help on using the changeset viewer.