Changeset ac2b598 for libcfa/src/concurrency/monitor.hfa
- Timestamp:
- Feb 24, 2020, 2:21:03 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 959f6ad
- Parents:
- 0f2c555
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/monitor.hfa
r0f2c555 rac2b598 23 23 24 24 trait is_monitor(dtype T) { 25 monitor_desc* get_monitor( T & );25 $monitor * get_monitor( T & ); 26 26 void ^?{}( T & mutex ); 27 27 }; 28 28 29 static inline void ?{}( monitor_desc& this) with( this ) {29 static inline void ?{}($monitor & this) with( this ) { 30 30 lock{}; 31 31 entry_queue{}; … … 39 39 } 40 40 41 static inline void ^?{}( monitor_desc& ) {}41 static inline void ^?{}($monitor & ) {} 42 42 43 43 struct monitor_guard_t { 44 monitor_desc** m;44 $monitor ** m; 45 45 __lock_size_t count; 46 46 __monitor_group_t prev; 47 47 }; 48 48 49 void ?{}( monitor_guard_t & this, monitor_desc** m, __lock_size_t count, void (*func)() );49 void ?{}( monitor_guard_t & this, $monitor ** m, __lock_size_t count, void (*func)() ); 50 50 void ^?{}( monitor_guard_t & this ); 51 51 52 52 struct monitor_dtor_guard_t { 53 monitor_desc* m;53 $monitor * m; 54 54 __monitor_group_t prev; 55 55 }; 56 56 57 void ?{}( monitor_dtor_guard_t & this, monitor_desc** m, void (*func)() );57 void ?{}( monitor_dtor_guard_t & this, $monitor ** m, void (*func)() ); 58 58 void ^?{}( monitor_dtor_guard_t & this ); 59 59 … … 72 72 73 73 // The monitor this criterion concerns 74 monitor_desc* target;74 $monitor * target; 75 75 76 76 // The parent node to which this criterion belongs … … 87 87 struct __condition_node_t { 88 88 // Thread that needs to be woken when all criteria are met 89 thread_desc* waiting_thread;89 $thread * waiting_thread; 90 90 91 91 // Array of criteria (Criterions are contiguous in memory) … … 106 106 } 107 107 108 void ?{}(__condition_node_t & this, thread_desc* waiting_thread, __lock_size_t count, uintptr_t user_info );108 void ?{}(__condition_node_t & this, $thread * waiting_thread, __lock_size_t count, uintptr_t user_info ); 109 109 void ?{}(__condition_criterion_t & this ); 110 void ?{}(__condition_criterion_t & this, monitor_desc* target, __condition_node_t * owner );110 void ?{}(__condition_criterion_t & this, $monitor * target, __condition_node_t * owner ); 111 111 112 112 struct condition { … … 115 115 116 116 // Array of monitor pointers (Monitors are NOT contiguous in memory) 117 monitor_desc** monitors;117 $monitor ** monitors; 118 118 119 119 // Number of monitors in the array
Note: See TracChangeset
for help on using the changeset viewer.