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