Changeset 87d13cd for src/libcfa/concurrency/monitor
- Timestamp:
- Mar 21, 2017, 10:07:52 PM (9 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:
- cb91437
- Parents:
- 829c907 (diff), a53e10a (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
r829c907 r87d13cd 22 22 #include "stdlib" 23 23 24 struct monitor_desc {25 spinlock lock;26 thread_desc * owner;27 simple_thread_list entry_queue;28 unsigned int recursion;29 };30 31 24 static inline void ?{}(monitor_desc * this) { 32 25 this->owner = 0; 33 26 this->recursion = 0; 34 27 } 35 36 //Basic entering routine37 void enter(monitor_desc *);38 void leave(monitor_desc *);39 28 40 29 //Array entering routine … … 49 38 static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) { 50 39 return ((intptr_t)lhs) < ((intptr_t)rhs); 51 }52 53 static inline void ?{}( monitor_guard_t * this, monitor_desc ** m ) {54 this->m = m;55 this->count = 1;56 enter( *this->m );57 40 } 58 41
Note:
See TracChangeset
for help on using the changeset viewer.