- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.cfa (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r58d64a4 r0190480 237 237 $coroutine * proc_cor = get_coroutine(this->runner); 238 238 239 // Update global state 240 kernelTLS.this_thread = thrd_dst; 241 239 242 // set state of processor coroutine to inactive 240 243 verify(proc_cor->state == Active); … … 250 253 thrd_dst->unpark_stale = true; 251 254 ) 252 // Update global state253 kernelTLS.this_thread = thrd_dst;254 255 255 256 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); … … 258 259 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit) || thrd_dst->curr_cor == proc_cor, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst ); // add escape condition if we are setting up the processor 259 260 260 261 261 // set context switch to the thread that the processor is executing 262 262 verify( thrd_dst->context.SP ); … … 269 269 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); 270 270 271 // Reset global state272 kernelTLS.this_thread = 0p;273 271 274 272 // We just finished running a thread, there are a few things that could have happened. … … 315 313 // Just before returning to the processor, set the processor coroutine to active 316 314 proc_cor->state = Active; 315 kernelTLS.this_thread = 0p; 317 316 318 317 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); … … 522 521 disable_interrupts(); 523 522 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); 524 post( this->idle );523 bool ret = post( this->idle ); 525 524 enable_interrupts( __cfaabi_dbg_ctx ); 526 525 }
Note:
See TracChangeset
for help on using the changeset viewer.