Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/monitor.c

    rcc7f4b1 r51f3798  
    66struct global_t {
    77        int value;
    8         __monitor_t m;
     8        monitor m;
    99};
    1010
     
    1616
    1717void increment( /*mutex*/ global_t * this ) {
    18         monitor_guard_t g1 = { &this->m };
    19         {
    20                 monitor_guard_t g2 = { &this->m };
    21                 {
    22                         monitor_guard_t g3 = { &this->m };
    23                         this->value += 1;
    24                 }
    25         }
     18        monitor_guard g = { &this->m };
     19        this->value += 1;
    2620}
    2721
Note: See TracChangeset for help on using the changeset viewer.