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/wait.cfa

    r7951100 rb067d9b  
    55
    66
    7 #include <fstream>
    8 #include <kernel>
    9 #include <monitor>
    10 #include <stdlib>
    11 #include <thread>
    12 #include <time>
     7#include <fstream.hfa>
     8#include <kernel.hfa>
     9#include <monitor.hfa>
     10#include <stdlib.hfa>
     11#include <thread.hfa>
     12#include <time.hfa>
     13
     14#define __kick_rate 12000ul
     15#include "long_tests.hfa"
    1316
    1417#ifndef PREEMPTION_RATE
     
    2023}
    2124
    22 #ifdef LONG_TEST
     25#ifdef TEST_LONG
    2326static const unsigned long N = 375_000ul;
    2427#else
     
    8083                                break;
    8184                        default:
    82                                 sout | "Something went wrong" | endl;
     85                                sout | "Something went wrong";
    8386                                abort();
    8487                }
     
    9093// Waiter ABC
    9194void main( WaiterABC & this ) {
    92         for( int i = 0; i < N; i++ ) {
     95        for( int i = 0; TEST(i < N); i++ ) {
    9396                wait( condABC, globalA, globalB, globalC );
     97                KICK_WATCHDOG;
    9498        }
    9599
     
    100104// Waiter AB
    101105void main( WaiterAB & this ) {
    102         for( int i = 0; i < N; i++ ) {
     106        for( int i = 0; TEST(i < N); i++ ) {
    103107                wait( condAB , globalA, globalB );
     108                KICK_WATCHDOG;
    104109        }
    105110
     
    110115// Waiter AC
    111116void main( WaiterAC & this ) {
    112         for( int i = 0; i < N; i++ ) {
     117        for( int i = 0; TEST(i < N); i++ ) {
    113118                wait( condAC , globalA, globalC );
     119                KICK_WATCHDOG;
    114120        }
    115121
     
    120126// Waiter BC
    121127void main( WaiterBC & this ) {
    122         for( int i = 0; i < N; i++ ) {
     128        for( int i = 0; TEST(i < N); i++ ) {
    123129                wait( condBC , globalB, globalC );
     130                KICK_WATCHDOG;
    124131        }
    125132
     
    133140        waiter_left = 4;
    134141        processor p[2];
    135         sout | "Starting" | endl;
     142        sout | "Starting";
    136143        {
    137144                Signaler  e;
     
    143150                }
    144151        }
    145         sout | "Done" | endl;
     152        sout | "Done";
    146153}
Note: See TracChangeset for help on using the changeset viewer.