- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.cfa
r12daa43 r96bfdde7 15 15 16 16 #define __cforall_thread__ 17 #define _GNU_SOURCE18 19 17 // #define __CFA_DEBUG_PRINT_RUNTIME_CORE__ 20 18 … … 280 278 281 279 // Spin a little on I/O, just in case 282 for(5) {280 for(5) { 283 281 __maybe_io_drain( this ); 284 282 readyThread = pop_fast( this->cltr ); … … 287 285 288 286 // no luck, try stealing a few times 289 for(5) {287 for(5) { 290 288 if( __maybe_io_drain( this ) ) { 291 289 readyThread = pop_fast( this->cltr ); … … 424 422 __cfactx_switch( &proc_cor->context, &thrd_dst->context ); 425 423 // when __cfactx_switch returns we are back in the processor coroutine 426 427 428 424 429 425 /* paranoid */ verify( 0x0D15EA5E0D15EA5Ep == thrd_dst->canary ); … … 526 522 527 523 /* paranoid */ verify( ! __preemption_enabled() ); 528 /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) < ((uintptr_t)__get_stack(thrd_src->curr_cor)->base ) || thrd_src->corctx_flag, "ERROR : Returning $thread %p has been corrupted.\n StackPointer too small.\n", thrd_src );529 /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) > ((uintptr_t)__get_stack(thrd_src->curr_cor)->limit) || thrd_src->corctx_flag, "ERROR : Returning $thread %p has been corrupted.\n StackPointer too large.\n", thrd_src );524 /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) < ((uintptr_t)__get_stack(thrd_src->curr_cor)->base ), "ERROR : Returning $thread %p has been corrupted.\n StackPointer too small.\n", thrd_src ); 525 /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) > ((uintptr_t)__get_stack(thrd_src->curr_cor)->limit), "ERROR : Returning $thread %p has been corrupted.\n StackPointer too large.\n", thrd_src ); 530 526 } 531 527
Note:
See TracChangeset
for help on using the changeset viewer.