Changeset 87d13cd for src/libcfa/concurrency/kernel.c
- Timestamp:
- Mar 21, 2017, 10:07:52 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, 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:
- cb91437
- Parents:
- 829c907 (diff), a53e10a (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
-
src/libcfa/concurrency/kernel.c
r829c907 r87d13cd 107 107 108 108 void ?{}( thread_desc * this, current_stack_info_t * info) { 109 (&this->c ){ info };109 (&this->cor){ info }; 110 110 } 111 111 … … 113 113 // Processor coroutine 114 114 void ?{}(processorCtx_t * this, processor * proc) { 115 (&this-> c){};115 (&this->__cor){}; 116 116 this->proc = proc; 117 117 proc->runner = this; … … 119 119 120 120 void ?{}(processorCtx_t * this, processor * proc, current_stack_info_t * info) { 121 (&this-> c){ info };121 (&this->__cor){ info }; 122 122 this->proc = proc; 123 123 proc->runner = this; … … 255 255 processorCtx_t proc_cor_storage = { proc, &info }; 256 256 257 LIB_DEBUG_PRINTF("Coroutine : created stack %p\n", proc_cor_storage. c.stack.base);257 LIB_DEBUG_PRINTF("Coroutine : created stack %p\n", proc_cor_storage.__cor.stack.base); 258 258 259 259 //Set global state 260 proc->current_coroutine = &proc->runner-> c;260 proc->current_coroutine = &proc->runner->__cor; 261 261 proc->current_thread = NULL; 262 262 … … 268 268 // back to here. Instead directly call the main since we already are on the 269 269 // appropriate stack. 270 proc_cor_storage. c.state = Active;270 proc_cor_storage.__cor.state = Active; 271 271 main( &proc_cor_storage ); 272 proc_cor_storage. c.state = Halted;272 proc_cor_storage.__cor.state = Halted; 273 273 274 274 // Main routine of the core returned, the core is now fully terminated … … 359 359 this_processor = systemProcessor; 360 360 this_processor->current_thread = mainThread; 361 this_processor->current_coroutine = &mainThread->c ;361 this_processor->current_coroutine = &mainThread->cor; 362 362 363 363 // SKULLDUGGERY: Force a context switch to the system processor to set the main thread's context to the current UNIX
Note: See TracChangeset
for help on using the changeset viewer.