Changes in src/libcfa/concurrency/monitor [0cf5b79:59a0bde]
- File:
-
- 1 edited
-
src/libcfa/concurrency/monitor (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor
r0cf5b79 r59a0bde 34 34 this.recursion = 0; 35 35 this.mask.accepted = NULL; 36 this.mask. data= NULL;36 this.mask.clauses = NULL; 37 37 this.mask.size = 0; 38 38 this.dtor_node = NULL; … … 40 40 41 41 struct 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; 45 47 }; 46 48 … … 49 51 50 52 struct 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; 53 57 }; 54 58 … … 79 83 }; 80 84 81 static inline __condition_criterion_t * & get_next( __condition_criterion_t & this ) {82 return this.next;83 }84 85 85 struct __condition_node_t { 86 86 // Thread that needs to be woken when all criteria are met … … 100 100 }; 101 101 102 static inline __condition_node_t * & get_next( __condition_node_t & this ) { 103 return this.next; 104 } 102 struct __condition_blocked_queue_t { 103 __condition_node_t * head; 104 __condition_node_t ** tail; 105 }; 105 106 106 107 void ?{}(__condition_node_t & this, thread_desc * waiting_thread, __lock_size_t count, uintptr_t user_info ); … … 108 109 void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner ); 109 110 111 void ?{}( __condition_blocked_queue_t & ); 112 void append( __condition_blocked_queue_t &, __condition_node_t * ); 113 __condition_node_t * pop_head( __condition_blocked_queue_t & ); 114 110 115 struct condition { 111 116 // 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; 113 118 114 119 // Array of monitor pointers (Monitors are NOT contiguous in memory)
Note:
See TracChangeset
for help on using the changeset viewer.