Changeset 1fbab5a for src/libcfa/concurrency/monitor
- Timestamp:
- Mar 16, 2017, 4:50:08 PM (7 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:
- 395fc37, 64ac636, ef42b143
- Parents:
- 2f26687a (diff), d6d747d (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
r2f26687a r1fbab5a 22 22 #include "stdlib" 23 23 24 struct __monitor_t{24 struct monitor_desc { 25 25 spinlock lock; 26 thread * owner;26 thread_desc * owner; 27 27 simple_thread_list entry_queue; 28 28 unsigned int recursion; 29 29 }; 30 30 31 static inline void ?{}( __monitor_t* this) {31 static inline void ?{}(monitor_desc * this) { 32 32 this->owner = 0; 33 33 this->recursion = 0; … … 35 35 36 36 //Basic entering routine 37 void enter( __monitor_t*);38 void leave( __monitor_t*);37 void enter(monitor_desc *); 38 void leave(monitor_desc *); 39 39 40 40 //Array entering routine 41 void enter( __monitor_t**, int count);42 void leave( __monitor_t**, int count);41 void enter(monitor_desc **, int count); 42 void leave(monitor_desc **, int count); 43 43 44 44 struct monitor_guard_t { 45 __monitor_t** m;45 monitor_desc ** m; 46 46 int count; 47 47 }; 48 48 49 static inline int ?<?( __monitor_t* lhs, __monitor_t* rhs) {49 static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) { 50 50 return ((intptr_t)lhs) < ((intptr_t)rhs); 51 51 } 52 52 53 static inline void ?{}( monitor_guard_t * this, __monitor_t** m ) {53 static inline void ?{}( monitor_guard_t * this, monitor_desc ** m ) { 54 54 this->m = m; 55 55 this->count = 1; … … 57 57 } 58 58 59 static inline void ?{}( monitor_guard_t * this, __monitor_t** m, int count ) {59 static inline void ?{}( monitor_guard_t * this, monitor_desc ** m, int count ) { 60 60 this->m = m; 61 61 this->count = count;
Note: See TracChangeset
for help on using the changeset viewer.