Ignore:
Timestamp:
Apr 4, 2019, 3:37:55 PM (3 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
8c01e1b
Parents:
2fabdc02
Message:

Swapped memory storage for context and stack information inside the coroutine implementation

File:
1 edited

Legend:

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

    r2fabdc02 rb2f6113  
    8080
    8181        disable_interrupts();
    82         create_stack(&thrd_c->stack, thrd_c->stack.size);
     82        assert( thrd_c->stack.storage );
    8383        CtxStart(&this, CtxInvokeThread);
    84         assert( thrd_c->last->stack.context );
    85         CtxSwitch( thrd_c->last->stack.context, thrd_c->stack.context );
     84        CtxSwitch( &thrd_c->last->context, &thrd_c->context );
    8685
    8786        ScheduleThread(thrd_h);
     
    118117        // set new coroutine that the processor is executing
    119118        // and context switch to it
    120         assert( src->stack.context );
    121         CtxSwitch( src->stack.context, dst->stack.context );
     119        CtxSwitch( &src->context, &dst->context );
    122120
    123121        // set state of new coroutine to active
Note: See TracChangeset for help on using the changeset viewer.