Ignore:
Timestamp:
Nov 3, 2017, 3:01:31 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
4ee36bf0
Parents:
4ee1efb (diff), 760ba67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into cleanup-dtors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/prodcons.c

    r4ee1efb r136ccd7  
    1010// Created On       : Mon Sep 18 12:23:39 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Sep 20 17:03:28 2017
    13 // Update Count     : 40
     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 = (unsigned int)rand48() % 100;                  // non-negative
    33                 int p2 = (unsigned int)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.