Ignore:
Timestamp:
Oct 31, 2017, 1:41:33 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
0dc954b
Parents:
c59bde6
Message:

change random name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/sched-ext-barge.c

    rc59bde6 r6c7b1e7  
    4242void main( barger_t & this ) {
    4343        yield();
    44         while( barge( global ) ) { yield(((unsigned)rand48()) % 10); }
     44        while( barge( global ) ) { yield(random( 10 )); }
    4545}
    4646
    4747bool do_call( global_t & mutex this ) {
    48         yield(((unsigned)rand48()) % 10);
     48        yield(random( 10 ));
    4949        if( this.state != WAITFOR && !this.done && this.started ) {
    5050                serr | "Barging before caller detected" | endl;
     
    5757thread caller_t {};
    5858void main( caller_t & this ) {
    59         while( do_call(global) ) { yield(((unsigned)rand48()) % 10); }
     59        while( do_call(global) ) { yield(random( 10 )); }
    6060}
    6161
     
    6363        this.started = true;
    6464        for( int i = 0; i < N; i++) {
    65                 yield(((unsigned)rand48()) % 10);
     65                yield(random( 10 ));
    6666                this.state = WAITFOR;
    6767                waitfor(do_call, this) {
Note: See TracChangeset for help on using the changeset viewer.