Ignore:
File:
1 edited

Legend:

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

    rdd4e2d7 ra7b486b  
    256256}
    257257
    258 void ?{}(cluster & this, const char name[], Duration preemption_rate, unsigned io_flags) with( this ) {
     258void ?{}(cluster & this, const char name[], Duration preemption_rate, int io_flags) with( this ) {
    259259        this.name = name;
    260260        this.preemption_rate = preemption_rate;
     
    374374
    375375                /* paranoid */ verify( ! kernelTLS.preemption_state.enabled );
     376                /* paranoid */ verify( kernelTLS.this_thread == thrd_dst );
    376377                /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ) || thrd_dst->curr_cor == proc_cor, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst ); // add escape condition if we are setting up the processor
    377378                /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit) || thrd_dst->curr_cor == proc_cor, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst ); // add escape condition if we are setting up the processor
     
    384385                /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit), "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst );
    385386                /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ), "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst );
     387                /* paranoid */ verify( kernelTLS.this_thread == thrd_dst );
    386388                /* paranoid */ verify( ! kernelTLS.preemption_state.enabled );
    387389
     
    901903        // Wake them up
    902904        __cfadbg_print_safe(runtime_core, "Kernel : waking Processor %p\n", this->idles.head);
     905        /* paranoid */ verify( ! kernelTLS.preemption_state.enabled );
    903906        post( this->idles.head->idle );
    904907
     
    911914static bool __wake_proc(processor * this) {
    912915        __cfadbg_print_safe(runtime_core, "Kernel : waking Processor %p\n", this);
    913         return post( this->idle );
     916
     917        disable_interrupts();
     918                /* paranoid */ verify( ! kernelTLS.preemption_state.enabled );
     919                bool ret = post( this->idle );
     920        enable_interrupts( __cfaabi_dbg_ctx );
     921
     922        return ret;
    914923}
    915924
Note: See TracChangeset for help on using the changeset viewer.