Changeset 83a071f9 for src/tests/monitor.c
- Timestamp:
- Aug 11, 2017, 10:10:26 AM (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:
- fd344aa
- Parents:
- 8499c707
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/monitor.c
r8499c707 r83a071f9 14 14 static global_t global; 15 15 16 void increment3( global_t *mutex this ) {17 this ->value += 1;16 void increment3( global_t & mutex this ) { 17 this.value += 1; 18 18 } 19 19 20 void increment2( global_t *mutex this ) {20 void increment2( global_t & mutex this ) { 21 21 increment3( this ); 22 22 } 23 23 24 void increment( global_t *mutex this ) {24 void increment( global_t & mutex this ) { 25 25 increment2( this ); 26 26 } … … 28 28 thread MyThread {}; 29 29 30 void main( MyThread *this ) {30 void main( MyThread & this ) { 31 31 for(int i = 0; i < 1_000_000; i++) { 32 increment( &global );32 increment( global ); 33 33 } 34 34 }
Note: See TracChangeset
for help on using the changeset viewer.