Ignore:
Timestamp:
Feb 4, 2020, 11:29:11 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
4f7b418
Parents:
5cdeecd
Message:

Optim : coroutine and thread creation no-longer uses polymorphic call, leading to significant speedup. Breaks Arm support

File:
1 edited

Legend:

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

    r5cdeecd r09f357ec  
    469469        );
    470470
    471         Abort( pthread_attr_setstack( &attr, stack, stacksize ), "pthread_attr_setstack" ); 
     471        Abort( pthread_attr_setstack( &attr, stack, stacksize ), "pthread_attr_setstack" );
    472472
    473473        Abort( pthread_create( pthread, &attr, start, arg ), "pthread_create" );
     
    490490        verify( ! kernelTLS.preemption_state.enabled );
    491491
     492        kernelTLS.this_thread->curr_cor = dst;
    492493        __stack_prepare( &dst->stack, 65000 );
    493         CtxStart(&this->runner, CtxInvokeCoroutine);
     494        CtxStart(main, dst, this->runner, CtxInvokeCoroutine);
    494495
    495496        verify( ! kernelTLS.preemption_state.enabled );
     
    505506        CtxSwitch( &src->context, &dst->context );
    506507        // when CtxSwitch returns we are back in the src coroutine
     508
     509        mainThread->curr_cor = &mainThread->self_cor;
    507510
    508511        // set state of new coroutine to active
Note: See TracChangeset for help on using the changeset viewer.