Changes in kernel/generic/src/proc/scheduler.c [e1326cf:1558d85] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/scheduler.c
re1326cf r1558d85 52 52 #include <atomic.h> 53 53 #include <synch/spinlock.h> 54 #include <synch/workqueue.h> 55 #include <synch/rcu.h> 54 56 #include <config.h> 55 57 #include <context.h> … … 61 63 #include <cpu.h> 62 64 #include <print.h> 65 #include <log.h> 63 66 #include <debug.h> 64 67 #include <stacktrace.h> … … 86 89 { 87 90 before_thread_runs_arch(); 91 rcu_before_thread_runs(); 88 92 89 93 #ifdef CONFIG_FPU_LAZY … … 126 130 static void after_thread_ran(void) 127 131 { 132 workq_after_thread_ran(); 133 rcu_after_thread_ran(); 128 134 after_thread_ran_arch(); 129 135 } … … 218 224 goto loop; 219 225 } 226 227 ASSERT(!CPU->idle); 220 228 221 229 unsigned int i; … … 397 405 ASSERT((!THREAD) || (irq_spinlock_locked(&THREAD->lock))); 398 406 ASSERT(CPU != NULL); 407 ASSERT(interrupts_disabled()); 399 408 400 409 /* … … 420 429 421 430 case Exiting: 431 rcu_thread_exiting(); 422 432 repeat: 423 433 if (THREAD->detached) { … … 517 527 518 528 #ifdef SCHEDULER_VERBOSE 519 printf("cpu%u: tid %" PRIu64 " (priority=%d, ticks=%" PRIu64 520 ", nrdy=%ld)\n", CPU->id, THREAD->tid, THREAD->priority, 529 log(LF_OTHER, LVL_DEBUG, 530 "cpu%u: tid %" PRIu64 " (priority=%d, ticks=%" PRIu64 531 ", nrdy=%" PRIua ")", CPU->id, THREAD->tid, THREAD->priority, 521 532 THREAD->ticks, atomic_get(&CPU->nrdy)); 522 533 #endif … … 663 674 664 675 #ifdef KCPULB_VERBOSE 665 printf("kcpulb%u: TID %" PRIu64 " -> cpu%u, " 666 "nrdy=%ld, avg=%ld\n", CPU->id, t->tid, 676 log(LF_OTHER, LVL_DEBUG, 677 "kcpulb%u: TID %" PRIu64 " -> cpu%u, " 678 "nrdy=%ld, avg=%ld", CPU->id, t->tid, 667 679 CPU->id, atomic_get(&CPU->nrdy), 668 680 atomic_get(&nrdy) / config.cpu_active); … … 739 751 740 752 printf("\trq[%u]: ", i); 741 list_foreach(cpus[cpu].rq[i].rq, cur) { 742 thread_t *thread = list_get_instance(cur, 743 thread_t, rq_link); 753 list_foreach(cpus[cpu].rq[i].rq, rq_link, thread_t, 754 thread) { 744 755 printf("%" PRIu64 "(%s) ", thread->tid, 745 756 thread_states[thread->state]);
Note:
See TracChangeset
for help on using the changeset viewer.