Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor

    r0cf5b79 r59a0bde  
    3434        this.recursion     = 0;
    3535        this.mask.accepted = NULL;
    36         this.mask.data     = NULL;
     36        this.mask.clauses  = NULL;
    3737        this.mask.size     = 0;
    3838        this.dtor_node     = NULL;
     
    4040
    4141struct monitor_guard_t {
    42         monitor_desc **         m;
    43         __lock_size_t           count;
    44         __monitor_group_t prev;
     42        monitor_desc ** m;
     43        __lock_size_t   count;
     44        monitor_desc ** prev_mntrs;
     45        __lock_size_t   prev_count;
     46        fptr_t          prev_func;
    4547};
    4648
     
    4951
    5052struct monitor_dtor_guard_t {
    51         monitor_desc *    m;
    52         __monitor_group_t prev;
     53        monitor_desc * m;
     54        monitor_desc ** prev_mntrs;
     55        __lock_size_t   prev_count;
     56        fptr_t          prev_func;
    5357};
    5458
     
    7983};
    8084
    81 static inline __condition_criterion_t * & get_next( __condition_criterion_t & this ) {
    82         return this.next;
    83 }
    84 
    8585struct __condition_node_t {
    8686        // Thread that needs to be woken when all criteria are met
     
    100100};
    101101
    102 static inline __condition_node_t * & get_next( __condition_node_t & this ) {
    103         return this.next;
    104 }
     102struct __condition_blocked_queue_t {
     103        __condition_node_t * head;
     104        __condition_node_t ** tail;
     105};
    105106
    106107void ?{}(__condition_node_t & this, thread_desc * waiting_thread, __lock_size_t count, uintptr_t user_info );
     
    108109void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner );
    109110
     111void ?{}( __condition_blocked_queue_t & );
     112void append( __condition_blocked_queue_t &, __condition_node_t * );
     113__condition_node_t * pop_head( __condition_blocked_queue_t & );
     114
    110115struct condition {
    111116        // Link list which contains the blocked threads as-well as the information needed to unblock them
    112         __queue_t(__condition_node_t) blocked;
     117        __condition_blocked_queue_t blocked;
    113118
    114119        // Array of monitor pointers (Monitors are NOT contiguous in memory)
Note: See TracChangeset for help on using the changeset viewer.