Ignore:
Timestamp:
Nov 8, 2017, 5:43:33 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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:
954908d
Parents:
78315272 (diff), e35f30a (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/sched-int-barge.c

    r78315272 r3f7e12cb  
     1//----------------------------------------------------------------------------------------
     2//----------------------------------------------------------------------------------------
     3//
     4//              DEPRECATED TEST
     5//
     6//----------------------------------------------------------------------------------------
     7//----------------------------------------------------------------------------------------
     8
    19#include <fstream>
    210#include <kernel>
     
    5664
    5765        if( action == 0 ) {
    58                 c.do_signal = max( ((unsigned)rand48()) % 10, 1);
    59                 c.do_wait1 = ((unsigned)rand48()) % (c.do_signal);
    60                 c.do_wait2 = ((unsigned)rand48()) % (c.do_signal);
     66                c.do_signal = max( random( 10 ), 1);
     67                c.do_wait1 = random( c.do_signal );
     68                c.do_wait2 = random( c.do_signal );
    6169
    6270                if(c.do_wait1 == c.do_wait2) sout | "Same" | endl;
     
    6573        if( action == c.do_wait1 || action == c.do_wait2 ) {
    6674                c.state = WAIT;
    67                 wait( &cond );
     75                wait( cond );
    6876
    6977                if(c.state != SIGNAL) {
     
    7583                c.state = SIGNAL;
    7684
    77                 signal( &cond );
    78                 signal( &cond );
     85                signal( cond );
     86                signal( cond );
    7987        }
    8088        else {
     
    101109
    102110int main(int argc, char* argv[]) {
    103         rand48seed(0);
     111        random_seed(0);
    104112        processor p;
    105113        {
Note: See TracChangeset for help on using the changeset viewer.