Changeset 635 for trunk/kernel/kern/scheduler.c
- Timestamp:
- Jun 26, 2019, 11:42:37 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/scheduler.c
r630 r635 180 180 sched = &core->scheduler; 181 181 182 ////////////////// scan user threads to handle bothACK and DELETE requests182 ////////////////// scan user threads to handle ACK and DELETE requests 183 183 root = &sched->u_root; 184 184 iter = root->next; … … 195 195 { 196 196 197 // check t hread blocked197 // check target thread blocked 198 198 assert( (thread->blocked & THREAD_BLOCKED_GLOBAL) , "thread not blocked" ); 199 199 … … 206 206 207 207 // handle REQ_DELETE only if target thread != calling thread 208 if( (thread->flags & THREAD_FLAG_REQ_DELETE) && (thread != CURRENT_THREAD) ) 209 { 208 if( thread->flags & THREAD_FLAG_REQ_DELETE ) 209 { 210 211 // check calling thread != target thread 212 assert( (thread != CURRENT_THREAD) , "calling thread cannot delete itself" ); 213 210 214 // get thread process descriptor 211 215 process = thread->process; … … 497 501 remote_fifo_t * fifo = &LOCAL_CLUSTER->rpc_fifo[lid]; 498 502 503 #if DEBUG_SCHED_YIELD 504 uint32_t cycle = (uint32_t)hal_get_cycles(); 505 #endif 506 499 507 #if (DEBUG_SCHED_YIELD & 0x1) 500 if( sched->trace )508 if( sched->trace || (cycle > DEBUG_SCHED_YIELD) ) 501 509 sched_display( lid ); 502 510 #endif … … 551 559 552 560 #if DEBUG_SCHED_YIELD 553 if( sched->trace )561 if( sched->trace || (cycle > DEBUG_SCHED_YIELD) ) 554 562 printk("\n[%s] core[%x,%d] / cause = %s\n" 555 563 " thread %x (%s) (%x,%x) => thread %x (%s) (%x,%x) / cycle %d\n", 556 564 __FUNCTION__, local_cxy, lid, cause, 557 565 current, thread_type_str(current->type), current->process->pid, current->trdid,next , 558 thread_type_str(next->type) , next->process->pid , next->trdid , (uint32_t)hal_get_cycles());566 thread_type_str(next->type) , next->process->pid , next->trdid , cycle ); 559 567 #endif 560 568 … … 567 575 busylock_release( &sched->lock ); 568 576 569 #if (DEBUG_SCHED_YIELD & 1)570 if( sched->trace )577 #if DEBUG_SCHED_YIELD 578 if( sched->trace || (cycle > DEBUG_SCHED_YIELD) ) 571 579 printk("\n[%s] core[%x,%d] / cause = %s\n" 572 580 " thread %x (%s) (%x,%x) continue / cycle %d\n",
Note: See TracChangeset
for help on using the changeset viewer.