- Timestamp:
- Mar 16, 2017, 4:50:08 PM (7 years ago)
- 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. - Location:
- src/tests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/coroutine.c
r2f26687a r1fbab5a 1 1 #include <fstream> 2 #include <coroutine s>2 #include <coroutine> 3 3 4 4 struct Fibonacci { 5 5 int fn; // used for communication 6 coroutine c;6 coroutine_desc c; 7 7 }; 8 8 … … 11 11 } 12 12 13 coroutine * get_coroutine(Fibonacci* this) {13 coroutine_desc* get_coroutine(Fibonacci* this) { 14 14 return &this->c; 15 15 } … … 47 47 #ifdef MORE_DEBUG 48 48 Fibonacci *pf1 = &f1, *pf2 = &f2; 49 coroutine *cf1 = &f1.c, *cf2 = &f2.c;49 coroutine_desc *cf1 = &f1.c, *cf2 = &f2.c; 50 50 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); 52 52 Fibonacci *ov1 = (Fibonacci *)get_object(vf1), *ov2 = (Fibonacci *)get_object(vf2); 53 53 -
src/tests/monitor.c
r2f26687a r1fbab5a 2 2 #include <kernel> 3 3 #include <monitor> 4 #include <thread s>4 #include <thread> 5 5 6 6 struct global_t { 7 7 int value; 8 __monitor_tm;8 monitor_desc m; 9 9 }; 10 10 … … 16 16 17 17 void increment( /*mutex*/ global_t * this ) { 18 __monitor_t* mon = &this->m;18 monitor_desc * mon = &this->m; 19 19 monitor_guard_t g1 = { &mon }; 20 20 { … … 27 27 } 28 28 29 struct MyThread { thread t; };29 struct MyThread { thread_desc t; }; 30 30 31 31 DECL_THREAD(MyThread); -
src/tests/multi-monitor.c
r2f26687a r1fbab5a 2 2 #include <kernel> 3 3 #include <monitor> 4 #include <thread s>4 #include <thread> 5 5 6 6 static int global12, global23, global13; 7 7 8 static __monitor_tm1, m2, m3;8 static monitor_desc m1, m2, m3; 9 9 10 void increment( /*mutex*/ __monitor_t * p1, /*mutex*/ __monitor_t* p2, int * value ) {11 __monitor_t* mons[] = { p1, p2 };10 void increment( /*mutex*/ monitor_desc * p1, /*mutex*/ monitor_desc * p2, int * value ) { 11 monitor_desc * mons[] = { p1, p2 }; 12 12 monitor_guard_t g = { mons, 2 }; 13 13 *value += 1; … … 15 15 16 16 struct MyThread { 17 thread t;17 thread_desc t; 18 18 int target; 19 19 }; -
src/tests/test.py
r2f26687a r1fbab5a 250 250 parser = argparse.ArgumentParser(description='Script which runs cforall tests') 251 251 parser.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')252 parser.add_argument('--concurrent', help='Run concurrent tests', type=yes_no, default='yes') 253 253 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 254 254 parser.add_argument('--list', help='List all test available', action='store_true') -
src/tests/thread.c
r2f26687a r1fbab5a 2 2 #include <kernel> 3 3 #include <stdlib> 4 #include <thread s>4 #include <thread> 5 5 6 struct First { thread t; signal_once* lock; };7 struct Second { thread t; signal_once* lock; };6 struct First { thread_desc t; signal_once* lock; }; 7 struct Second { thread_desc t; signal_once* lock; }; 8 8 9 9 DECL_THREAD(First);
Note: See TracChangeset
for help on using the changeset viewer.