Changeset 16a6a617 for libcfa/src/concurrency/thread.cfa
- Timestamp:
- Apr 2, 2019, 3:26:38 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 98319ad
- Parents:
- 9be2b60 (diff), 2fabdc02 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/thread.cfa
r9be2b60 r16a6a617 75 75 coroutine_desc* thrd_c = get_coroutine(this); 76 76 thread_desc * thrd_h = get_thread (this); 77 thrd_c->last = TL_GET( this_ coroutine );77 thrd_c->last = TL_GET( this_thread )->curr_cor; 78 78 79 79 // __cfaabi_dbg_print_safe("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h); … … 81 81 disable_interrupts(); 82 82 create_stack(&thrd_c->stack, thrd_c->stack.size); 83 kernelTLS.this_coroutine = thrd_c;84 83 CtxStart(&this, CtxInvokeThread); 85 84 assert( thrd_c->last->stack.context ); … … 92 91 extern "C" { 93 92 // KERNEL ONLY 94 void __finish_creation(void) { 95 coroutine_desc* thrd_c = kernelTLS.this_coroutine; 93 void __finish_creation(coroutine_desc * thrd_c) { 96 94 ThreadCtxSwitch( thrd_c, thrd_c->last ); 97 95 } … … 120 118 // set new coroutine that the processor is executing 121 119 // and context switch to it 122 kernelTLS.this_coroutine = dst;123 120 assert( src->stack.context ); 124 121 CtxSwitch( src->stack.context, dst->stack.context ); 125 kernelTLS.this_coroutine = src;126 122 127 123 // set state of new coroutine to active
Note: See TracChangeset
for help on using the changeset viewer.