Changeset 1fbab5a for src/tests


Ignore:
Timestamp:
Mar 16, 2017, 4:50:08 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
395fc37, 64ac636, ef42b143
Parents:
2f26687a (diff), d6d747d (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:/u/cforall/software/cfa/cfa-cc

Location:
src/tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/tests/coroutine.c

    r2f26687a r1fbab5a  
    11#include <fstream>
    2 #include <coroutines>
     2#include <coroutine>
    33
    44struct Fibonacci {
    55      int fn; // used for communication
    6       coroutine c;
     6      coroutine_desc c;
    77};
    88
     
    1111}
    1212
    13 coroutine* get_coroutine(Fibonacci* this) {
     13coroutine_desc* get_coroutine(Fibonacci* this) {
    1414      return &this->c;
    1515}
     
    4747#ifdef MORE_DEBUG     
    4848      Fibonacci *pf1 = &f1, *pf2 = &f2;
    49       coroutine *cf1 = &f1.c, *cf2 = &f2.c;
     49      coroutine_desc *cf1 = &f1.c, *cf2 = &f2.c;
    5050      covptr_t  *vf1 = vtable(pf1), *vf2 = vtable(pf2);
    51       coroutine *cv1 = get_coroutine(vf1), *cv2 = get_coroutine(vf2);
     51      coroutine_desc *cv1 = get_coroutine(vf1), *cv2 = get_coroutine(vf2);
    5252      Fibonacci *ov1 = (Fibonacci *)get_object(vf1), *ov2 = (Fibonacci *)get_object(vf2);
    5353
  • src/tests/monitor.c

    r2f26687a r1fbab5a  
    22#include <kernel>
    33#include <monitor>
    4 #include <threads>
     4#include <thread>
    55
    66struct global_t {
    77        int value;
    8         __monitor_t m;
     8        monitor_desc m;
    99};
    1010
     
    1616
    1717void increment( /*mutex*/ global_t * this ) {
    18         __monitor_t * mon = &this->m;
     18        monitor_desc * mon = &this->m;
    1919        monitor_guard_t g1 = { &mon };
    2020        {
     
    2727}
    2828
    29 struct MyThread { thread t; };
     29struct MyThread { thread_desc t; };
    3030
    3131DECL_THREAD(MyThread);
  • src/tests/multi-monitor.c

    r2f26687a r1fbab5a  
    22#include <kernel>
    33#include <monitor>
    4 #include <threads>
     4#include <thread>
    55
    66static int global12, global23, global13;
    77
    8 static __monitor_t m1, m2, m3;
     8static monitor_desc m1, m2, m3;
    99
    10 void increment( /*mutex*/ __monitor_t * p1, /*mutex*/ __monitor_t * p2, int * value ) {
    11         __monitor_t * mons[] = { p1, p2 };
     10void increment( /*mutex*/ monitor_desc * p1, /*mutex*/ monitor_desc * p2, int * value ) {
     11        monitor_desc * mons[] = { p1, p2 };
    1212        monitor_guard_t g = { mons, 2 };
    1313        *value += 1;
     
    1515
    1616struct MyThread {
    17         thread t;
     17        thread_desc t;
    1818        int target;
    1919};
  • src/tests/test.py

    r2f26687a r1fbab5a  
    250250parser = argparse.ArgumentParser(description='Script which runs cforall tests')
    251251parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no')
    252 parser.add_argument('--concurrent', help='Run concurrent tests', type=yes_no, default='no')
     252parser.add_argument('--concurrent', help='Run concurrent tests', type=yes_no, default='yes')
    253253parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true')
    254254parser.add_argument('--list', help='List all test available', action='store_true')
  • src/tests/thread.c

    r2f26687a r1fbab5a  
    22#include <kernel>
    33#include <stdlib>
    4 #include <threads>
     4#include <thread>
    55
    6 struct First { thread t; signal_once* lock; };
    7 struct Second { thread t; signal_once* lock; };
     6struct First { thread_desc t; signal_once* lock; };
     7struct Second { thread_desc t; signal_once* lock; };
    88
    99DECL_THREAD(First);
Note: See TracChangeset for help on using the changeset viewer.