- File:
-
- 1 edited
-
src/libcfa/concurrency/coroutine.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/coroutine.c
r4aa2fb2 r1c273d0 32 32 #include "invoke.h" 33 33 34 extern thread_local processor * this_processor;34 extern volatile thread_local processor * this_processor; 35 35 36 36 //----------------------------------------------------------------------------- … … 106 106 107 107 // set state of current coroutine to inactive 108 src->state = Inactive;108 src->state = src->state == Halted ? Halted : Inactive; 109 109 110 110 // set new coroutine that task is executing 111 this_ processor->current_coroutine = dst;111 this_coroutine = dst; 112 112 113 113 // context switch to specified coroutine 114 assert( src->stack.context ); 114 115 CtxSwitch( src->stack.context, dst->stack.context ); 115 116 // when CtxSwitch returns we are back in the src coroutine
Note:
See TracChangeset
for help on using the changeset viewer.