Ignore:
File:
1 edited

Legend:

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

    rc66f6cb r8e16177  
    256256}
    257257
    258 void ?{}(cluster & this, const char name[], Duration preemption_rate) 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;
     
    270270        threads{ __get };
    271271
    272         __kernel_io_startup( this, &this == mainCluster );
     272        __kernel_io_startup( this, io_flags, &this == mainCluster );
    273273
    274274        doregister(this);
     
    901901        // Wake them up
    902902        __cfadbg_print_safe(runtime_core, "Kernel : waking Processor %p\n", this->idles.head);
     903        /* paranoid */ verify( ! kernelTLS.preemption_state.enabled );
    903904        post( this->idles.head->idle );
    904905
     
    911912static bool __wake_proc(processor * this) {
    912913        __cfadbg_print_safe(runtime_core, "Kernel : waking Processor %p\n", this);
    913         return post( this->idle );
     914
     915        disable_interrupts();
     916                /* paranoid */ verify( ! kernelTLS.preemption_state.enabled );
     917                bool ret = post( this->idle );
     918        enable_interrupts( __cfaabi_dbg_ctx );
     919
     920        return ret;
    914921}
    915922
     
    9931000void ^?{}(semaphore & this) {}
    9941001
    995 void P(semaphore & this) with( this ){
     1002bool P(semaphore & this) with( this ){
    9961003        lock( lock __cfaabi_dbg_ctx2 );
    9971004        count -= 1;
     
    10031010                unlock( lock );
    10041011                park( __cfaabi_dbg_ctx );
     1012                return true;
    10051013        }
    10061014        else {
    10071015            unlock( lock );
     1016            return false;
    10081017        }
    10091018}
Note: See TracChangeset for help on using the changeset viewer.