Changeset ca37445 for src/tests/concurrent/signal
- Timestamp:
- Apr 10, 2018, 3:31:07 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, with_gc
- Children:
- 33f5b57
- Parents:
- 9d1e3f7 (diff), 8ad6533 (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/concurrent/signal
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/concurrent/signal/barge.c
r9d1e3f7 rca37445 16 16 17 17 #ifndef PREEMPTION_RATE 18 #define PREEMPTION_RATE 10 _000ul18 #define PREEMPTION_RATE 10`ms 19 19 #endif 20 20 21 unsigned intdefault_preemption() {21 Duration default_preemption() { 22 22 return 0; 23 23 } -
src/tests/concurrent/signal/block.c
r9d1e3f7 rca37445 22 22 23 23 #ifndef PREEMPTION_RATE 24 #define PREEMPTION_RATE 10 _000ul24 #define PREEMPTION_RATE 10`ms 25 25 #endif 26 26 27 unsigned intdefault_preemption() {27 Duration default_preemption() { 28 28 return PREEMPTION_RATE; 29 29 } … … 51 51 //------------------------------------------------------------------------------ 52 52 void wait_op( global_data_t & mutex a, global_data_t & mutex b, unsigned i ) { 53 wait( cond, (uintptr_t)this_thread);53 wait( cond, (uintptr_t)active_thread() ); 54 54 55 55 yield( random( 10 ) ); … … 60 60 } 61 61 62 a.last_thread = b.last_thread = this_thread;62 a.last_thread = b.last_thread = active_thread(); 63 63 64 64 yield( random( 10 ) ); … … 76 76 yield( random( 10 ) ); 77 77 78 [a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = this_thread;78 [a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = active_thread(); 79 79 80 80 if( !is_empty( cond ) ) { … … 106 106 //------------------------------------------------------------------------------ 107 107 void barge_op( global_data_t & mutex a ) { 108 a.last_thread = this_thread;108 a.last_thread = active_thread(); 109 109 } 110 110 -
src/tests/concurrent/signal/disjoint.c
r9d1e3f7 rca37445 13 13 14 14 #ifndef PREEMPTION_RATE 15 #define PREEMPTION_RATE 10 _000ul15 #define PREEMPTION_RATE 10`ms 16 16 #endif 17 17 18 unsigned intdefault_preemption() {18 Duration default_preemption() { 19 19 return PREEMPTION_RATE; 20 20 } -
src/tests/concurrent/signal/wait.c
r9d1e3f7 rca37445 20 20 21 21 #ifndef PREEMPTION_RATE 22 #define PREEMPTION_RATE 10 _000ul22 #define PREEMPTION_RATE 10`ms 23 23 #endif 24 24 25 unsigned intdefault_preemption() {25 Duration default_preemption() { 26 26 return PREEMPTION_RATE; 27 27 }
Note: See TracChangeset
for help on using the changeset viewer.