Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor

    r751d963 raaa4f93  
    1010// Created On       : Thd Feb 23 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Oct  7 18:06:45 2017
    13 // Update Count     : 10
     12// Last Modified On : Sat Jul 22 09:59:01 2017
     13// Update Count     : 3
    1414//
    1515
     
    2929static inline void ?{}(monitor_desc & this) {
    3030        (this.lock){};
     31        this.owner = NULL;
    3132        (this.entry_queue){};
    3233        (this.signal_stack){};
    33         this.owner         = NULL;
    34         this.recursion     = 0;
     34        this.recursion = 0;
    3535        this.mask.accepted = NULL;
    3636        this.mask.clauses  = NULL;
    3737        this.mask.size     = 0;
    38         this.dtor_node     = NULL;
    3938}
    40 
    41 // static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {
    42 //      return ((intptr_t)lhs) < ((intptr_t)rhs);
    43 // }
    4439
    4540struct monitor_guard_t {
     
    5146};
    5247
     48static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {
     49        return ((intptr_t)lhs) < ((intptr_t)rhs);
     50}
     51
    5352void ?{}( monitor_guard_t & this, monitor_desc ** m, int count, void (*func)() );
    5453void ^?{}( monitor_guard_t & this );
    55 
    56 struct monitor_dtor_guard_t {
    57         monitor_desc * m;
    58         monitor_desc ** prev_mntrs;
    59         unsigned short  prev_count;
    60         fptr_t          prev_func;
    61 };
    62 
    63 void ?{}( monitor_dtor_guard_t & this, monitor_desc ** m, void (*func)() );
    64 void ^?{}( monitor_dtor_guard_t & this );
    65 
    66 static inline forall( dtype T | sized(T) | { void ^?{}( T & mutex ); } )
    67 void delete( T * th ) {
    68         ^(*th){};
    69         free( th );
    70 }
    7154
    7255//-----------------------------------------------------------------------------
     
    9275        __condition_node_t ** tail;
    9376};
    94 
    95 void ?{}(__condition_node_t & this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info );
    96 void ?{}(__condition_criterion_t & this );
    97 void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner );
    9877
    9978void ?{}( __condition_blocked_queue_t & );
Note: See TracChangeset for help on using the changeset viewer.