Ignore:
Timestamp:
Aug 25, 2017, 10:38:34 AM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/monitor.c

    raf08051 r28e58fd  
    88};
    99
    10 void ?{}(global_t * this) {
    11         this->value = 0;
     10void ?{}(global_t & this) {
     11        this.value = 0;
    1212}
    1313
    1414static global_t global;
    1515
    16 void increment3( global_t * mutex this ) {
    17         this->value += 1;
     16void increment3( global_t & mutex this ) {
     17        this.value += 1;
    1818}
    1919
    20 void increment2( global_t * mutex this ) {
     20void increment2( global_t & mutex this ) {
    2121        increment3( this );
    2222}
    2323
    24 void increment( global_t * mutex this ) {
     24void increment( global_t & mutex this ) {
    2525        increment2( this );
    2626}
     
    2828thread MyThread {};
    2929
    30 void main( MyThread* this ) {
     30void main( MyThread & this ) {
    3131        for(int i = 0; i < 1_000_000; i++) {
    32                 increment( &global );
     32                increment( global );
    3333        }
    3434}
Note: See TracChangeset for help on using the changeset viewer.