Changes in src/libcfa/concurrency/monitor [751d963:aaa4f93]
- File:
-
- 1 edited
-
src/libcfa/concurrency/monitor (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor
r751d963 raaa4f93 10 10 // Created On : Thd Feb 23 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Oct 7 18:06:45201713 // Update Count : 1012 // Last Modified On : Sat Jul 22 09:59:01 2017 13 // Update Count : 3 14 14 // 15 15 … … 29 29 static inline void ?{}(monitor_desc & this) { 30 30 (this.lock){}; 31 this.owner = NULL; 31 32 (this.entry_queue){}; 32 33 (this.signal_stack){}; 33 this.owner = NULL; 34 this.recursion = 0; 34 this.recursion = 0; 35 35 this.mask.accepted = NULL; 36 36 this.mask.clauses = NULL; 37 37 this.mask.size = 0; 38 this.dtor_node = NULL;39 38 } 40 41 // static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {42 // return ((intptr_t)lhs) < ((intptr_t)rhs);43 // }44 39 45 40 struct monitor_guard_t { … … 51 46 }; 52 47 48 static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) { 49 return ((intptr_t)lhs) < ((intptr_t)rhs); 50 } 51 53 52 void ?{}( monitor_guard_t & this, monitor_desc ** m, int count, void (*func)() ); 54 53 void ^?{}( monitor_guard_t & this ); 55 56 struct monitor_dtor_guard_t {57 monitor_desc * m;58 monitor_desc ** prev_mntrs;59 unsigned short prev_count;60 fptr_t prev_func;61 };62 63 void ?{}( monitor_dtor_guard_t & this, monitor_desc ** m, void (*func)() );64 void ^?{}( monitor_dtor_guard_t & this );65 66 static inline forall( dtype T | sized(T) | { void ^?{}( T & mutex ); } )67 void delete( T * th ) {68 ^(*th){};69 free( th );70 }71 54 72 55 //----------------------------------------------------------------------------- … … 92 75 __condition_node_t ** tail; 93 76 }; 94 95 void ?{}(__condition_node_t & this, thread_desc * waiting_thread, unsigned short count, uintptr_t user_info );96 void ?{}(__condition_criterion_t & this );97 void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner );98 77 99 78 void ?{}( __condition_blocked_queue_t & );
Note:
See TracChangeset
for help on using the changeset viewer.