Changeset 6ae8c92 for src/libcfa/concurrency/invoke.h
- Timestamp:
- Sep 20, 2017, 4:50:52 PM (8 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:
- a2dbad10
- Parents:
- 0895cba
- File:
-
- 1 edited
-
src/libcfa/concurrency/invoke.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/invoke.h
r0895cba r6ae8c92 84 84 }; 85 85 86 struct __waitfor_mask_t { 87 short * accepted; // the index of the accepted function, -1 if none 88 struct __acceptable_t * clauses; // list of acceptable functions, null if any 89 short size; // number of acceptable functions 90 }; 91 86 92 struct monitor_desc { 87 93 struct spinlock lock; // spinlock to protect internal data … … 90 96 struct __condition_stack_t signal_stack; // stack of conditions to run next once we exit the monitor 91 97 unsigned int recursion; // monitor routines can be called recursively, we need to keep track of that 92 93 struct __acceptable_t * acceptables; // list of acceptable functions, null if any 94 unsigned short acceptable_count; // number of acceptable functions 95 short accepted_index; // the index of the accepted function, -1 if none 98 struct __waitfor_mask_t mask; // mask used to know if some thread is waiting for something while holding the monitor 96 99 }; 97 100 98 struct __monitor_group {101 struct __monitor_group_t { 99 102 struct monitor_desc ** list; // currently held monitors 100 103 short size; // number of currently held monitors … … 107 110 struct monitor_desc self_mon; // monitor body used for mutual exclusion 108 111 struct monitor_desc * self_mon_p; // pointer to monitor with sufficient lifetime for current monitors 109 struct __monitor_group monitors; // monitors currently held by this thread112 struct __monitor_group_t monitors; // monitors currently held by this thread 110 113 111 114 // Link lists fields … … 117 120 #ifdef __CFORALL__ 118 121 extern "Cforall" { 119 static inline monitor_desc * ?[?]( const __monitor_group & this, ptrdiff_t index ) {122 static inline monitor_desc * ?[?]( const __monitor_group_t & this, ptrdiff_t index ) { 120 123 return this.list[index]; 121 124 } 122 125 123 static inline bool ?==?( const __monitor_group & lhs, const __monitor_group& rhs ) {126 static inline bool ?==?( const __monitor_group_t & lhs, const __monitor_group_t & rhs ) { 124 127 if( lhs.size != rhs.size ) return false; 125 128 if( lhs.func != rhs.func ) return false;
Note:
See TracChangeset
for help on using the changeset viewer.