Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel.cfa

    rf2b18d01 r398e8e9  
    346346
    347347                $thread * readyThread = 0p;
    348                 for( unsigned int spin_count = 0; ! __atomic_load_n(&this->do_terminate, __ATOMIC_SEQ_CST); spin_count++ ) {
     348                for( unsigned int spin_count = 0;; spin_count++ ) {
    349349                        // Try to get the next thread
    350350                        readyThread = __next_thread( this->cltr );
     
    362362                                /* paranoid */ verify( ! kernelTLS.preemption_state.enabled );
    363363                        }
    364                         else {
     364
     365                        if(__atomic_load_n(&this->do_terminate, __ATOMIC_SEQ_CST)) break;
     366
     367                        if( !readyThread ) {
    365368                                // Block until a thread is ready
    366369                                __halt(this);
Note: See TracChangeset for help on using the changeset viewer.