Changes in src/tests/monitor.c [83a071f9:bd4d011]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/monitor.c
r83a071f9 rbd4d011 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.