Changeset 398e8e9


Ignore:
Timestamp:
Jul 1, 2020, 12:13:30 PM (15 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
8291293
Parents:
7812a7b5
Message:

Tentative deadlock fix

File:
1 edited

Legend:

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

    r7812a7b5 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.