Ignore:
Timestamp:
Nov 18, 2020, 2:28:02 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
69d1748
Parents:
9d6e1b8a
Message:

Added more checks for thread termination synchronization

File:
1 edited

Legend:

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

    r9d6e1b8a r3ea8ad1  
    288288                }
    289289
    290                 if(unlikely(thrd_dst->state == Halted)) {
     290                if(unlikely(thrd_dst->state == Halting)) {
    291291                        // The thread has halted, it should never be scheduled/run again
    292292                        // finish the thread
     
    484484                /* paranoid */ verifyf( ((uintptr_t)thrd->context.SP) < ((uintptr_t)__get_stack(thrd->curr_cor)->base ), "ERROR : $thread %p has been corrupted.\n StackPointer too small.\n", thrd );
    485485
    486                 thrd->state = Halted;
     486                thrd->state = Halting;
    487487                if( TICKET_RUNNING != thrd->ticket ) { abort( "Thread terminated with pending unpark" ); }
    488488                if( thrd != this->owner ) { abort( "Thread internal monitor has incorrect owner" ); }
Note: See TracChangeset for help on using the changeset viewer.