Ignore:
Timestamp:
Apr 11, 2019, 10:36:13 AM (3 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
3c06bba
Parents:
e8e457e
Message:

Fixed errno virtualization and enabled preemption during coroutine context switch

File:
1 edited

Legend:

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

    re8e457e r5c1a531  
    126126// Wrapper for co
    127127void CoroutineCtxSwitch(coroutine_desc* src, coroutine_desc* dst) {
    128         // Safety note : Preemption must be disabled since there is a race condition
    129         // kernelTLS.this_thread->curr_cor and $rsp/$rbp must agree at all times
    130         verify( TL_GET( preemption_state.enabled ) || TL_GET( this_processor )->do_terminate );
    131         disable_interrupts();
    132 
    133128        // set state of current coroutine to inactive
    134129        src->state = src->state == Halted ? Halted : Inactive;
     
    144139        // set state of new coroutine to active
    145140        src->state = Active;
    146 
    147         enable_interrupts( __cfaabi_dbg_ctx );
    148         verify( TL_GET( preemption_state.enabled ) || TL_GET( this_processor )->do_terminate );
    149141
    150142        if( unlikely(src->cancellation != NULL) ) {
Note: See TracChangeset for help on using the changeset viewer.