Changeset d5a52cc for src/libcfa/concurrency/monitor
- Timestamp:
- Nov 28, 2017, 3:04:37 PM (6 years ago)
- 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:
- 4e7a4e6
- Parents:
- 1393df07 (diff), 8a0a64d9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor
r1393df07 rd5a52cc 34 34 this.recursion = 0; 35 35 this.mask.accepted = NULL; 36 this.mask. clauses= NULL;36 this.mask.data = 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_desc ** prev_mntrs; 45 __lock_size_t prev_count; 46 fptr_t prev_func; 42 monitor_desc ** m; 43 __lock_size_t count; 44 __monitor_group_t prev; 47 45 }; 48 46 … … 51 49 52 50 struct monitor_dtor_guard_t { 53 monitor_desc * m; 54 monitor_desc ** prev_mntrs; 55 __lock_size_t prev_count; 56 fptr_t prev_func; 51 monitor_desc * m; 52 __monitor_group_t prev; 57 53 }; 58 54 … … 83 79 }; 84 80 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 struct __condition_blocked_queue_t { 103 __condition_node_t * head; 104 __condition_node_t ** tail; 105 }; 102 static inline __condition_node_t * & get_next( __condition_node_t & this ) { 103 return this.next; 104 } 106 105 107 106 void ?{}(__condition_node_t & this, thread_desc * waiting_thread, __lock_size_t count, uintptr_t user_info ); … … 109 108 void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner ); 110 109 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 115 110 struct condition { 116 111 // Link list which contains the blocked threads as-well as the information needed to unblock them 117 __ condition_blocked_queue_tblocked;112 __queue_t(__condition_node_t) blocked; 118 113 119 114 // Array of monitor pointers (Monitors are NOT contiguous in memory)
Note: See TracChangeset
for help on using the changeset viewer.