Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/concurrent/signal/disjoint.c

    ref952d7 rb9da9585  
    44#include <thread>
    55#include <time>
    6 
    7 #include "long_tests.h"
    86
    97#ifndef PREEMPTION_RATE
     
    1513}
    1614
    17 #ifdef TEST_LONG
     15#ifdef LONG_TEST
    1816static const unsigned long N = 300_000ul;
    1917#else
     
    2826monitor global_data_t;
    2927void ?{}( global_data_t & this );
    30 void ^?{} ( global_data_t & mutex this );
     28void ^?{} ( global_data_t & this );
    3129
    3230monitor global_data_t {
     
    4442}
    4543
    46 void ^?{} ( global_data_t & mutex this ) {}
     44void ^?{} ( global_data_t & this ) {}
    4745
    4846//------------------------------------------------------------------------------
     
    6967        }
    7068
    71         #if !defined(TEST_FOREVER)
    72                 d.counter++;
    73                 if( (d.counter % 1000) == 0 ) sout | d.counter | endl;
    74         #endif
     69        d.counter++;
    7570
    76         return TEST(d.counter < N);
     71        if( (d.counter % 1000) == 0 ) sout | d.counter | endl;
     72
     73        return d.counter < N;
    7774}
    7875
     
    8077
    8178void main( Waiter & this ) {
    82         while( wait( mut, data ) ) { KICK_WATCHDOG; yield(); }
     79        while( wait( mut, data ) ) { yield(); }
    8380}
    8481
     
    9794
    9895        //This is technically a mutual exclusion violation but the mutex monitor protects us
    99         bool running = TEST(data.counter < N) && data.counter > 0;
     96        bool running = data.counter < N && data.counter > 0;
    10097        if( data.state != SIGNAL && running ) {
    10198                sout | "ERROR Eager signal" | data.state | endl;
Note: See TracChangeset for help on using the changeset viewer.