- File:
-
- 1 edited
-
src/tests/concurrent/signal/block.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/concurrent/signal/block.c
r8ad6533 r70969f8 22 22 23 23 #ifndef PREEMPTION_RATE 24 #define PREEMPTION_RATE 10 `ms24 #define PREEMPTION_RATE 10_000ul 25 25 #endif 26 26 27 Durationdefault_preemption() {27 unsigned int 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)active_thread());53 wait( cond, (uintptr_t)this_thread ); 54 54 55 55 yield( random( 10 ) ); … … 60 60 } 61 61 62 a.last_thread = b.last_thread = active_thread();62 a.last_thread = b.last_thread = this_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] = active_thread();78 [a.last_thread, b.last_thread, a.last_signaller, b.last_signaller] = this_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 = active_thread();108 a.last_thread = this_thread; 109 109 } 110 110
Note:
See TracChangeset
for help on using the changeset viewer.