Ignore:
File:
1 edited

Legend:

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

    r12daa43 r96bfdde7  
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    18 
    1917// #define __CFA_DEBUG_PRINT_RUNTIME_CORE__
    2018
     
    280278
    281279                                // Spin a little on I/O, just in case
    282                                 for(5) {
     280                                        for(5) {
    283281                                        __maybe_io_drain( this );
    284282                                        readyThread = pop_fast( this->cltr );
     
    287285
    288286                                // no luck, try stealing a few times
    289                                 for(5) {
     287                                        for(5) {
    290288                                        if( __maybe_io_drain( this ) ) {
    291289                                                readyThread = pop_fast( this->cltr );
     
    424422                __cfactx_switch( &proc_cor->context, &thrd_dst->context );
    425423                // when __cfactx_switch returns we are back in the processor coroutine
    426 
    427 
    428424
    429425                /* paranoid */ verify( 0x0D15EA5E0D15EA5Ep == thrd_dst->canary );
     
    526522
    527523        /* paranoid */ verify( ! __preemption_enabled() );
    528         /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) < ((uintptr_t)__get_stack(thrd_src->curr_cor)->base ) || thrd_src->corctx_flag, "ERROR : Returning $thread %p has been corrupted.\n StackPointer too small.\n", thrd_src );
    529         /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) > ((uintptr_t)__get_stack(thrd_src->curr_cor)->limit) || thrd_src->corctx_flag, "ERROR : Returning $thread %p has been corrupted.\n StackPointer too large.\n", thrd_src );
     524        /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) < ((uintptr_t)__get_stack(thrd_src->curr_cor)->base ), "ERROR : Returning $thread %p has been corrupted.\n StackPointer too small.\n", thrd_src );
     525        /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) > ((uintptr_t)__get_stack(thrd_src->curr_cor)->limit), "ERROR : Returning $thread %p has been corrupted.\n StackPointer too large.\n", thrd_src );
    530526}
    531527
Note: See TracChangeset for help on using the changeset viewer.