Ignore:
Timestamp:
Oct 29, 2019, 4:01:24 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
773db65, 9421f3d8
Parents:
7951100 (diff), 8364209 (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 moved

Legend:

Unmodified
Added
Removed
  • tests/concurrent/signal/block.cfa

    r7951100 rb067d9b  
    77
    88
    9 #include <fstream>
    10 #include <kernel>
    11 #include <monitor>
    12 #include <stdlib>
    13 #include <thread>
    14 #include <time>
     9#include <fstream.hfa>
     10#include <kernel.hfa>
     11#include <monitor.hfa>
     12#include <stdlib.hfa>
     13#include <thread.hfa>
     14#include <time.hfa>
     15
     16#include "long_tests.hfa"
    1517
    1618#ifndef PREEMPTION_RATE
     
    2224}
    2325
    24 #ifdef LONG_TEST
     26#ifdef TEST_LONG
    2527static const unsigned long N = 150_000ul;
    2628#else
     
    5557
    5658        if(a.last_thread != a.last_signaller || b.last_thread != b.last_signaller ) {
    57                 sout | "ERROR Barging detected, expected" | a.last_signaller | b.last_signaller | "got" | a.last_thread | b.last_thread | endl;
     59                sout | "ERROR Barging detected, expected" | a.last_signaller | b.last_signaller | "got" | a.last_thread | b.last_thread;
    5860                abort();
    5961        }
     
    6668thread Waiter {};
    6769void main( Waiter & this ) {
    68         for( int i = 0; i < N; i++ ) {
     70        for( int i = 0; TEST(i < N); i++ ) {
    6971                wait_op( globalA, globalB, i );
     72                KICK_WATCHDOG;
    7073        }
    7174}
     
    8285
    8386                if( ! signal_block( cond ) ) {
    84                         sout | "ERROR expected to be able to signal" | endl;
     87                        sout | "ERROR expected to be able to signal";
    8588                        abort();
    8689                }
     
    8992
    9093                if(a.last_thread != next || b.last_thread != next) {
    91                         sout | "ERROR Barging detected, expected" | next | "got" | a.last_thread | b.last_thread | endl;
     94                        sout | "ERROR Barging detected, expected" | next | "got" | a.last_thread | b.last_thread;
    9295                        abort();
    9396                }
     
    127130                Signaller s[4];
    128131                Barger b[13];
    129                 sout | "Starting waiters" | endl;
     132                sout | "Starting waiters";
    130133                {
    131134                        Waiter w[3];
    132135                }
    133                 sout | "Waiters done" | endl;
     136                sout | "Waiters done";
    134137                done = true;
    135138        }
Note: See TracChangeset for help on using the changeset viewer.