Changeset cc7f4b1 for src/tests


Ignore:
Timestamp:
Feb 28, 2017, 12:40:47 PM (7 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:
2781e65, fd061ed3
Parents:
4868be4
Message:
  • renamed monitor to monitor_t since the type should not be exposed to users
  • added support for recursion in monitors
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/monitor.c

    r4868be4 rcc7f4b1  
    66struct global_t {
    77        int value;
    8         monitor m;
     8        __monitor_t m;
    99};
    1010
     
    1616
    1717void increment( /*mutex*/ global_t * this ) {
    18         monitor_guard g = { &this->m };
    19         this->value += 1;
     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        }
    2026}
    2127
Note: See TracChangeset for help on using the changeset viewer.