Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/coroutine.c

    rc40e7c5 rb69ea6b  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 21 22:34:57 2017
    13 // Update Count     : 1
     12// Last Modified On : Thu Feb  8 16:10:31 2018
     13// Update Count     : 4
    1414//
    1515
     
    7777                __cfaabi_dbg_debug_do(
    7878                        if ( mprotect( this.storage, pageSize, PROT_READ | PROT_WRITE ) == -1 ) {
    79                                 abortf( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) );
     79                                abort( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) );
    8080                        }
    8181                );
     
    9999// Wrapper for co
    100100void CoroutineCtxSwitch(coroutine_desc* src, coroutine_desc* dst) {
    101         // THREAD_GETMEM( This )->disableInterrupts();
     101        verify( preemption.enabled || this_processor->do_terminate );
     102        disable_interrupts();
    102103
    103104        // set state of current coroutine to inactive
     
    115116        src->state = Active;
    116117
    117         // THREAD_GETMEM( This )->enableInterrupts();
     118        enable_interrupts( __cfaabi_dbg_ctx );
     119        verify( preemption.enabled || this_processor->do_terminate );
    118120} //ctxSwitchDirect
    119121
     
    135137                __cfaabi_dbg_debug_do(
    136138                        if ( mprotect( storage, pageSize, PROT_NONE ) == -1 ) {
    137                                 abortf( "(uMachContext &)%p.createContext() : internal error, mprotect failure, error(%d) %s.", this, (int)errno, strerror( (int)errno ) );
     139                                abort( "(uMachContext &)%p.createContext() : internal error, mprotect failure, error(%d) %s.", this, (int)errno, strerror( (int)errno ) );
    138140                        } // if
    139141                );
    140142
    141143                if ( (intptr_t)storage == 0 ) {
    142                         abortf( "Attempt to allocate %d bytes of storage for coroutine or task execution-state but insufficient memory available.", size );
     144                        abort( "Attempt to allocate %zd bytes of storage for coroutine or task execution-state but insufficient memory available.", size );
    143145                } // if
    144146
Note: See TracChangeset for help on using the changeset viewer.