Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/datingService.c

    r2ba0bc7 r6c7b1e7  
    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>
     
    6161
    6262void main( Girl & g ) {
    63         yield( rand48( 100 ) );                                                         // don't all start at the same time
     63        yield( random( 100 ) );                                                         // don't all start at the same time
    6464        unsigned int partner = girl( g.TheExchange, g.id, g.ccode );
    6565        //sout | "Girl:" | g.id | "is dating Boy at" | partner | "with ccode" | g.ccode | endl;
     
    7979
    8080void main( Boy & b ) {
    81         yield( rand48( 100 ) );                                                         // don't all start at the same time
     81        yield( random( 100 ) );                                                         // don't all start at the same time
    8282        unsigned int partner = boy( b.TheExchange, b.id, b.ccode );
    8383        //sout | " Boy:" | b.id | "is dating Girl" | partner | "with ccode" | b.ccode | endl;
     
    9696        Boy  *boys[NoOfPairs];
    9797
    98         rand48seed( getpid() );
     98        random_seed( getpid() );
    9999
    100100        for ( unsigned int i = 0; i < NoOfPairs; i += 1 ) {
Note: See TracChangeset for help on using the changeset viewer.