Changeset 89a3df5 for src/libcfa/concurrency/thread.c
- Timestamp:
- Mar 15, 2017, 3:59:09 PM (6 years ago)
- Branches:
- aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 0e7b95c
- Parents:
- 0ea1b65
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/thread.c
r0ea1b65 r89a3df5 28 28 } 29 29 30 extern processor * get_this_processor();30 extern thread_local processor * this_processor; 31 31 32 32 //----------------------------------------------------------------------------- … … 77 77 thread* thrd_h = get_thread (this); 78 78 thrd_c->last = this_coroutine(); 79 get_this_processor()->current_coroutine = thrd_c;79 this_processor->current_coroutine = thrd_c; 80 80 81 81 LIB_DEBUG_PRINTF("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h); … … 94 94 95 95 void yield( void ) { 96 ScheduleInternal( get_this_processor()->current_thread );96 ScheduleInternal( this_processor->current_thread ); 97 97 } 98 98 … … 107 107 // set new coroutine that the processor is executing 108 108 // and context switch to it 109 get_this_processor()->current_coroutine = dst;109 this_processor->current_coroutine = dst; 110 110 CtxSwitch( src->stack.context, dst->stack.context ); 111 get_this_processor()->current_coroutine = src;111 this_processor->current_coroutine = src; 112 112 113 113 // set state of new coroutine to active
Note: See TracChangeset
for help on using the changeset viewer.