Changeset 28e58fd for src/tests/monitor.c
- Timestamp:
- Aug 25, 2017, 10:38:34 AM (8 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:
- 800d275
- Parents:
- af08051 (diff), 3eab308c (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
Legend:
- Unmodified
- Added
- Removed
-
src/tests/monitor.c
raf08051 r28e58fd 8 8 }; 9 9 10 void ?{}(global_t *this) {11 this ->value = 0;10 void ?{}(global_t & this) { 11 this.value = 0; 12 12 } 13 13 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.