Ignore:
Timestamp:
Nov 6, 2017, 10:28:17 AM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
bbeb908
Parents:
59a0bde (diff), 9f4524b (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/datingService.c

    r59a0bde r121ac13  
    99// Created On       : Mon Oct 30 12:56:20 2017
    1010// Last Modified By : Peter A. Buhr
    11 // Last Modified On : Mon Oct 30 17:58:41 2017
    12 // Update Count     : 14
     11// Last Modified On : Mon Oct 30 23:02:11 2017
     12// Update Count     : 15
    1313//
    1414
    15 #include <stdlib>                                                                               // rand48
     15#include <stdlib>                                                                               // random
    1616#include <fstream>
    1717#include <kernel>
     
    5757
    5858void main( Girl & g ) {
    59         yield( rand48( 100 ) );                                                         // don't all start at the same time
     59        yield( random( 100 ) );                                                         // don't all start at the same time
    6060        unsigned int partner = girl( g.TheExchange, g.id, g.ccode );
    6161        //sout | "Girl:" | g.id | "is dating Boy at" | partner | "with ccode" | g.ccode | endl;
     
    7575
    7676void main( Boy & b ) {
    77         yield( rand48( 100 ) );                                                         // don't all start at the same time
     77        yield( random( 100 ) );                                                         // don't all start at the same time
    7878        unsigned int partner = boy( b.TheExchange, b.id, b.ccode );
    7979        //sout | " Boy:" | b.id | "is dating Girl" | partner | "with ccode" | b.ccode | endl;
     
    9292        Boy  *boys[NoOfPairs];
    9393
    94         rand48seed( getpid() );
     94        random_seed( getpid() );
    9595
    9696        for ( unsigned int i = 0; i < NoOfPairs; i += 1 ) {
Note: See TracChangeset for help on using the changeset viewer.