Changeset 0428aad for src/libcfa/concurrency
- Timestamp:
- Apr 28, 2017, 12:34:17 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:
- 13e2c54, ad1a8dd
- Parents:
- f3fda4e (diff), 2e5ad9f (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
-
src/libcfa/concurrency/monitor.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor.c
rf3fda4e r0428aad 144 144 145 145 unsigned short count = this->monitor_count; 146 unsigned int blarg_recursions[ count ]; //Save the current recursion levels to restore them later147 spinlock * blarg_locks [ count ]; //We need to pass-in an array of locks to ScheduleInternal146 unsigned int recursions[ count ]; //Save the current recursion levels to restore them later 147 spinlock * locks [ count ]; //We need to pass-in an array of locks to ScheduleInternal 148 148 149 149 LIB_DEBUG_PRINT_SAFE("count %i\n", count); … … 166 166 append( &this->blocked, &waiter ); 167 167 168 lock_all( this->monitors, blarg_locks, count );169 save_recursion( this->monitors, blarg_recursions, count );168 lock_all( this->monitors, locks, count ); 169 save_recursion( this->monitors, recursions, count ); 170 170 //DON'T unlock, ask the kernel to do it 171 171 … … 185 185 LIB_DEBUG_PRINT_SAFE("\n"); 186 186 187 // Everything is ready to go to sleep188 ScheduleInternal( blarg_locks, count, threads, thread_count );187 // Everything is ready to go to sleep 188 ScheduleInternal( locks, count, threads, thread_count ); 189 189 190 190 … … 193 193 194 194 //We are back, restore the owners and recursions 195 lock_all( blarg_locks, count );196 restore_recursion( this->monitors, blarg_recursions, count );197 unlock_all( blarg_locks, count );195 lock_all( locks, count ); 196 restore_recursion( this->monitors, recursions, count ); 197 unlock_all( locks, count ); 198 198 } 199 199
Note:
See TracChangeset
for help on using the changeset viewer.