Ignore:
Timestamp:
Apr 17, 2018, 12:01:09 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, with_gc
Children:
3265399
Parents:
b2fe1c9 (diff), 81bb114 (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

Location:
src/tests/concurrent
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/tests/concurrent/examples/datingService.c

    rb2fe1c9 r32cab5b  
    88// Created On       : Mon Oct 30 12:56:20 2017
    99// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Tue Jan  2 12:19:01 2018
    11 // Update Count     : 22
     10// Last Modified On : Wed Mar 14 22:48:40 2018
     11// Update Count     : 23
    1212//
    1313
     
    8888int main() {
    8989        DatingService TheExchange;
    90         Girl *girls[NoOfPairs];
    91         Boy  *boys[NoOfPairs];
     90        Girl * girls[NoOfPairs];
     91        Boy  * boys[NoOfPairs];
    9292
    9393        srandom( /*getpid()*/ 103 );
  • src/tests/concurrent/preempt.c

    rb2fe1c9 r32cab5b  
    11#include <kernel>
    22#include <thread>
     3#include <time>
    34
    45#ifndef PREEMPTION_RATE
    5 #define PREEMPTION_RATE 10_000ul
     6#define PREEMPTION_RATE 10`ms
    67#endif
    78
    8 unsigned int default_preemption() {
     9Duration default_preemption() {
    910        return PREEMPTION_RATE;
    1011}
  • src/tests/concurrent/signal/barge.c

    rb2fe1c9 r32cab5b  
    1616
    1717#ifndef PREEMPTION_RATE
    18 #define PREEMPTION_RATE 10_000ul
     18#define PREEMPTION_RATE 10`ms
    1919#endif
    2020
    21 unsigned int default_preemption() {
     21Duration default_preemption() {
    2222        return 0;
    2323}
  • src/tests/concurrent/signal/block.c

    rb2fe1c9 r32cab5b  
    1212#include <stdlib>
    1313#include <thread>
    14 
    15 #include <time.h>
     14#include <time>
    1615
    1716#ifdef LONG_TEST
     
    2221
    2322#ifndef PREEMPTION_RATE
    24 #define PREEMPTION_RATE 10_000ul
     23#define PREEMPTION_RATE 10`ms
    2524#endif
    2625
    27 unsigned int default_preemption() {
     26Duration default_preemption() {
    2827        return PREEMPTION_RATE;
    2928}
     
    5150//------------------------------------------------------------------------------
    5251void wait_op( global_data_t & mutex a, global_data_t & mutex b, unsigned i ) {
    53         wait( cond, (uintptr_t)this_thread );
     52    wait( cond, (uintptr_t)active_thread() );
    5453
    5554        yield( random( 10 ) );
     
    6059        }
    6160
    62         a.last_thread = b.last_thread = this_thread;
     61        a.last_thread = b.last_thread = active_thread();
    6362
    6463        yield( random( 10 ) );
     
    7675        yield( random( 10 ) );
    7776
    78         [a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = this_thread;
     77        [a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = active_thread();
    7978
    8079        if( !is_empty( cond ) ) {
     
    106105//------------------------------------------------------------------------------
    107106void barge_op( global_data_t & mutex a ) {
    108         a.last_thread = this_thread;
     107        a.last_thread = active_thread();
    109108}
    110109
  • src/tests/concurrent/signal/disjoint.c

    rb2fe1c9 r32cab5b  
    33#include <monitor>
    44#include <thread>
    5 
    6 #include <time.h>
     5#include <time>
    76
    87#ifdef LONG_TEST
     
    1312
    1413#ifndef PREEMPTION_RATE
    15 #define PREEMPTION_RATE 10_000ul
     14#define PREEMPTION_RATE 10`ms
    1615#endif
    1716
    18 unsigned int default_preemption() {
     17Duration default_preemption() {
    1918        return PREEMPTION_RATE;
    2019}
  • src/tests/concurrent/signal/wait.c

    rb2fe1c9 r32cab5b  
    1010#include <stdlib>
    1111#include <thread>
    12 
    13 #include <time.h>
     12#include <time>
    1413
    1514#ifdef LONG_TEST
     
    2019
    2120#ifndef PREEMPTION_RATE
    22 #define PREEMPTION_RATE 10_000ul
     21#define PREEMPTION_RATE 10`ms
    2322#endif
    2423
    25 unsigned int default_preemption() {
     24Duration default_preemption() {
    2625        return PREEMPTION_RATE;
    2726}
  • src/tests/concurrent/waitfor/simple.c

    rb2fe1c9 r32cab5b  
    1010
    1111#ifndef PREEMPTION_RATE
    12 #define PREEMPTION_RATE 10_000ul
     12#define PREEMPTION_RATE 10`ms
    1313#endif
    1414
    15 unsigned int default_preemption() {
     15Duration default_preemption() {
    1616        return PREEMPTION_RATE;
    1717}
Note: See TracChangeset for help on using the changeset viewer.