Ignore:
Timestamp:
Sep 29, 2017, 12:18:51 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:
b8116cd
Parents:
ea156ae
Message:

Implemented out of order waitfor for destructors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor

    rea156ae r549c006  
    2929static inline void ?{}(monitor_desc & this) {
    3030        (this.lock){};
    31         this.owner = NULL;
    3231        (this.entry_queue){};
    3332        (this.signal_stack){};
    34         this.recursion = 0;
     33        this.owner         = NULL;
     34        this.recursion     = 0;
    3535        this.mask.accepted = NULL;
    3636        this.mask.clauses  = NULL;
    3737        this.mask.size     = 0;
     38        this.dtor_node     = NULL;
    3839}
     40
     41// static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {
     42//      return ((intptr_t)lhs) < ((intptr_t)rhs);
     43// }
    3944
    4045struct monitor_guard_t {
     
    4651};
    4752
    48 static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {
    49         return ((intptr_t)lhs) < ((intptr_t)rhs);
    50 }
    51 
    5253void ?{}( monitor_guard_t & this, monitor_desc ** m, int count, void (*func)() );
    5354void ^?{}( monitor_guard_t & this );
     55
     56
     57struct monitor_dtor_guard_t {
     58        monitor_desc * m;
     59        monitor_desc ** prev_mntrs;
     60        unsigned short  prev_count;
     61        fptr_t          prev_func;
     62};
     63
     64void ?{}( monitor_dtor_guard_t & this, monitor_desc ** m, void (*func)() );
     65void ^?{}( monitor_dtor_guard_t & this );
    5466
    5567//-----------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.