Ignore:
Timestamp:
Aug 11, 2017, 10:10:26 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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
Message:

Fix concurrency library, tests, and keywords for references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/monitor.c

    r8499c707 r83a071f9  
    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.