Changeset 1cdfa82 for src/tests/concurrent/signal/block.c
- Timestamp:
- Apr 25, 2018, 4:55:53 PM (8 years ago)
- Branches:
- new-env, with_gc
- Children:
- 42107b4
- Parents:
- 2efe4b8 (diff), 9d5fb67 (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. - File:
-
- 1 edited
-
src/tests/concurrent/signal/block.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/concurrent/signal/block.c
r2efe4b8 r1cdfa82 12 12 #include <stdlib> 13 13 #include <thread> 14 15 #include <time.h> 14 #include <time> 16 15 17 16 #ifdef LONG_TEST … … 22 21 23 22 #ifndef PREEMPTION_RATE 24 #define PREEMPTION_RATE 10 _000ul23 #define PREEMPTION_RATE 10`ms 25 24 #endif 26 25 27 unsigned intdefault_preemption() {26 Duration default_preemption() { 28 27 return PREEMPTION_RATE; 29 28 } … … 51 50 //------------------------------------------------------------------------------ 52 51 void 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() ); 54 53 55 54 yield( random( 10 ) ); … … 60 59 } 61 60 62 a.last_thread = b.last_thread = this_thread;61 a.last_thread = b.last_thread = active_thread(); 63 62 64 63 yield( random( 10 ) ); … … 76 75 yield( random( 10 ) ); 77 76 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(); 79 78 80 79 if( !is_empty( cond ) ) { … … 106 105 //------------------------------------------------------------------------------ 107 106 void barge_op( global_data_t & mutex a ) { 108 a.last_thread = this_thread;107 a.last_thread = active_thread(); 109 108 } 110 109
Note:
See TracChangeset
for help on using the changeset viewer.