Changes in src/libcfa/concurrency/monitor [bf7b9da7:6b0b624]
- File:
-
- 1 edited
-
src/libcfa/concurrency/monitor (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor
rbf7b9da7 r6b0b624 22 22 #include "stdlib" 23 23 24 static inline void ?{}(monitor_desc & this) { 25 (this.lock){}; 26 this.owner = NULL; 27 (this.entry_queue){}; 28 (this.signal_stack){}; 29 this.recursion = 0; 30 this.acceptables = NULL; 31 this.acceptable_count = 0; 32 this.accepted_index = -1; 24 static inline void ?{}(monitor_desc * this) { 25 this->owner = NULL; 26 this->recursion = 0; 33 27 } 34 28 … … 38 32 monitor_desc ** prev_mntrs; 39 33 unsigned short prev_count; 40 fptr_t prev_func;41 34 }; 42 35 … … 45 38 } 46 39 47 void ?{}( monitor_guard_t & this, monitor_desc ** m, int count, void (*func)());48 void ^?{}( monitor_guard_t &this );40 void ?{}( monitor_guard_t * this, monitor_desc ** m, int count ); 41 void ^?{}( monitor_guard_t * this ); 49 42 50 43 //----------------------------------------------------------------------------- … … 71 64 }; 72 65 73 void ?{}( __condition_blocked_queue_t &);66 void ?{}( __condition_blocked_queue_t * ); 74 67 void append( __condition_blocked_queue_t *, __condition_node_t * ); 75 68 __condition_node_t * pop_head( __condition_blocked_queue_t * ); … … 81 74 }; 82 75 83 static inline void ?{}( condition &this ) {84 this .monitors = NULL;85 this .monitor_count = 0;76 static inline void ?{}( condition * this ) { 77 this->monitors = NULL; 78 this->monitor_count = 0; 86 79 } 87 80 88 static inline void ^?{}( condition &this ) {89 free( this .monitors );81 static inline void ^?{}( condition * this ) { 82 free( this->monitors ); 90 83 } 91 84 … … 96 89 uintptr_t front( condition * this ); 97 90 98 //-----------------------------------------------------------------------------99 // External scheduling100 101 91 struct __acceptable_t { 102 fptr_t func;92 void (*func)(void); 103 93 unsigned short count; 104 monitor_desc * * monitors;94 monitor_desc * monitors[1]; 105 95 }; 106 96 107 int __accept_internal( unsigned short count, __acceptable_t * acceptables);97 void __accept_internal( unsigned short count, __acceptable_t * acceptables, void (*func)(void) ); 108 98 109 99 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.