Changeset 9c59cd4 for src/libcfa
- Timestamp:
- Apr 27, 2017, 2:59:36 PM (8 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:
- c07d724
- Parents:
- f80ab45
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor.c
rf80ab45 r9c59cd4 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.