Changeset 6840e7c for src/libcfa/concurrency/monitor
- Timestamp:
- Oct 19, 2017, 12:01:04 PM (8 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 837ce06
- Parents:
- b96ec83 (diff), a15b72c (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
rb96ec83 r6840e7c 10 10 // Created On : Thd Feb 23 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:59:01201713 // Update Count : 312 // Last Modified On : Sat Oct 7 18:06:45 2017 13 // Update Count : 10 14 14 // 15 15 … … 29 29 static inline void ?{}(monitor_desc & this) { 30 30 (this.lock){}; 31 this.owner = NULL;32 31 (this.entry_queue){}; 33 32 (this.signal_stack){}; 34 this.recursion = 0; 33 this.owner = NULL; 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; 38 39 } 40 41 // static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) { 42 // return ((intptr_t)lhs) < ((intptr_t)rhs); 43 // } 39 44 40 45 struct monitor_guard_t { … … 46 51 }; 47 52 48 static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {49 return ((intptr_t)lhs) < ((intptr_t)rhs);50 }51 52 53 void ?{}( monitor_guard_t & this, monitor_desc ** m, int count, void (*func)() ); 53 54 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 } 54 71 55 72 //----------------------------------------------------------------------------- … … 75 92 __condition_node_t ** tail; 76 93 }; 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 ); 77 98 78 99 void ?{}( __condition_blocked_queue_t & );
Note:
See TracChangeset
for help on using the changeset viewer.