Changes in / [5544465:2055098]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor.c

    r5544465 r2055098  
    130130        this_thread()->current_monitors      = this->prev_mntrs;
    131131        this_thread()->current_monitor_count = this->prev_count;
    132 }
    133 
    134 void debug_break() __attribute__(( noinline ))
    135 {
    136        
    137132}
    138133
     
    176171
    177172        //Find the next thread(s) to run
    178         unsigned short thread_count = 0;
     173        unsigned short thread_count = count;
    179174        thread_desc * threads[ count ];
    180         for(int i = 0; i < count; i++) {
    181                 threads[i] = 0;
    182         }
    183 
    184         debug_break();
    185175
    186176        for( int i = 0; i < count; i++) {
    187177                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        }
    192180
    193181        LIB_DEBUG_PRINT_SAFE("Will unblock: ");
     
    357345
    358346static 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++) {
    362348                if( thrds[i] == val ) return end;
    363349        }
Note: See TracChangeset for help on using the changeset viewer.