Changes in / [5544465:2055098]
- File:
-
- 1 edited
-
src/libcfa/concurrency/monitor.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor.c
r5544465 r2055098 130 130 this_thread()->current_monitors = this->prev_mntrs; 131 131 this_thread()->current_monitor_count = this->prev_count; 132 }133 134 void debug_break() __attribute__(( noinline ))135 {136 137 132 } 138 133 … … 176 171 177 172 //Find the next thread(s) to run 178 unsigned short thread_count = 0;173 unsigned short thread_count = count; 179 174 thread_desc * threads[ count ]; 180 for(int i = 0; i < count; i++) {181 threads[i] = 0;182 }183 184 debug_break();185 175 186 176 for( int i = 0; i < count; i++) { 187 177 thread_desc * new_owner = next_thread( this->monitors[i] ); 188 thread_count = insert_unique( threads, thread_count, new_owner ); 189 } 190 191 debug_break(); 178 thread_count = insert_unique( threads, i, new_owner ); 179 } 192 180 193 181 LIB_DEBUG_PRINT_SAFE("Will unblock: "); … … 357 345 358 346 static inline unsigned short insert_unique( thread_desc ** thrds, unsigned short end, thread_desc * val ) { 359 if( !val ) return end; 360 361 for(int i = 0; i <= end; i++) { 347 for(int i = 0; i < end; i++) { 362 348 if( thrds[i] == val ) return end; 363 349 }
Note:
See TracChangeset
for help on using the changeset viewer.