Changeset b4b63e8 for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Oct 1, 2020, 2:41:30 PM (3 years ago)
- Branches:
- ADT, arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- dd53f75
- Parents:
- e235429
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
re235429 rb4b63e8 251 251 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); 252 252 /* paranoid */ verify( kernelTLS.this_thread == thrd_dst ); 253 /* paranoid */ verify( thrd_dst->context.SP ); 253 254 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ) || thrd_dst->curr_cor == proc_cor, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst ); // add escape condition if we are setting up the processor 254 255 /* 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 256 /* paranoid */ verify( 0x0D15EA5E0D15EA5E == thrd_dst->canary ); 257 255 258 256 259 257 260 // set context switch to the thread that the processor is executing 258 verify( thrd_dst->context.SP );259 261 __cfactx_switch( &proc_cor->context, &thrd_dst->context ); 260 262 // when __cfactx_switch returns we are back in the processor coroutine 261 263 264 /* paranoid */ verify( 0x0D15EA5E0D15EA5E == thrd_dst->canary ); 262 265 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit), "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst ); 263 266 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ), "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst ); 267 /* paranoid */ verify( thrd_dst->context.SP ); 264 268 /* paranoid */ verify( kernelTLS.this_thread == thrd_dst ); 265 269 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); … … 330 334 __x87_store; 331 335 #endif 332 verify( proc_cor->context.SP ); 336 /* paranoid */ verify( proc_cor->context.SP ); 337 /* paranoid */ verify( 0x0D15EA5E0D15EA5E == thrd_src->canary ); 333 338 __cfactx_switch( &thrd_src->context, &proc_cor->context ); 339 /* paranoid */ verify( 0x0D15EA5E0D15EA5E == thrd_src->canary ); 334 340 #if defined( __i386 ) || defined( __x86_64 ) 335 341 __x87_load; … … 363 369 /* paranoid */ #endif 364 370 /* paranoid */ verifyf( thrd->link.next == 0p, "Expected null got %p", thrd->link.next ); 371 /* paranoid */ verify( 0x0D15EA5E0D15EA5E == thrd->canary ); 372 365 373 366 374 if (thrd->preempted == __NO_PREEMPTION) thrd->state = Ready;
Note: See TracChangeset
for help on using the changeset viewer.