Changes in kernel/generic/src/proc/scheduler.c [935e28c:b2fa1204] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/scheduler.c
r935e28c rb2fa1204 52 52 #include <atomic.h> 53 53 #include <synch/spinlock.h> 54 #include <synch/workqueue.h>55 #include <synch/rcu.h>56 54 #include <config.h> 57 55 #include <context.h> … … 63 61 #include <cpu.h> 64 62 #include <print.h> 63 #include <log.h> 65 64 #include <debug.h> 66 65 #include <stacktrace.h> 67 #include <cpu.h>68 66 69 67 static void scheduler_separated_stack(void); … … 89 87 { 90 88 before_thread_runs_arch(); 91 rcu_before_thread_runs();92 89 93 90 #ifdef CONFIG_FPU_LAZY … … 96 93 else 97 94 fpu_disable(); 98 #el se95 #elif defined CONFIG_FPU 99 96 fpu_enable(); 100 97 if (THREAD->fpu_context_exists) … … 130 127 static void after_thread_ran(void) 131 128 { 132 workq_after_thread_ran();133 rcu_after_thread_ran();134 129 after_thread_ran_arch(); 135 130 } … … 224 219 goto loop; 225 220 } 226 227 ASSERT(!CPU->idle);228 221 229 222 unsigned int i; … … 335 328 THREAD->kcycles += get_cycle() - THREAD->last_cycle; 336 329 337 #if ndef CONFIG_FPU_LAZY330 #if (defined CONFIG_FPU) && (!defined CONFIG_FPU_LAZY) 338 331 fpu_context_save(THREAD->saved_fpu_context); 339 332 #endif … … 405 398 ASSERT((!THREAD) || (irq_spinlock_locked(&THREAD->lock))); 406 399 ASSERT(CPU != NULL); 407 ASSERT(interrupts_disabled());408 400 409 401 /* … … 429 421 430 422 case Exiting: 431 rcu_thread_exiting();432 423 repeat: 433 424 if (THREAD->detached) { … … 527 518 528 519 #ifdef SCHEDULER_VERBOSE 529 printf("cpu%u: tid %" PRIu64 " (priority=%d, ticks=%" PRIu64 530 ", nrdy=%ld)\n", CPU->id, THREAD->tid, THREAD->priority, 520 log(LF_OTHER, LVL_DEBUG, 521 "cpu%u: tid %" PRIu64 " (priority=%d, ticks=%" PRIu64 522 ", nrdy=%" PRIua ")", CPU->id, THREAD->tid, THREAD->priority, 531 523 THREAD->ticks, atomic_get(&CPU->nrdy)); 532 524 #endif … … 673 665 674 666 #ifdef KCPULB_VERBOSE 675 printf("kcpulb%u: TID %" PRIu64 " -> cpu%u, " 676 "nrdy=%ld, avg=%ld\n", CPU->id, t->tid, 667 log(LF_OTHER, LVL_DEBUG, 668 "kcpulb%u: TID %" PRIu64 " -> cpu%u, " 669 "nrdy=%ld, avg=%ld", CPU->id, t->tid, 677 670 CPU->id, atomic_get(&CPU->nrdy), 678 671 atomic_get(&nrdy) / config.cpu_active); … … 749 742 750 743 printf("\trq[%u]: ", i); 751 list_foreach(cpus[cpu].rq[i].rq, cur) { 752 thread_t *thread = list_get_instance(cur, 753 thread_t, rq_link); 744 list_foreach(cpus[cpu].rq[i].rq, rq_link, thread_t, 745 thread) { 754 746 printf("%" PRIu64 "(%s) ", thread->tid, 755 747 thread_states[thread->state]);
Note:
See TracChangeset
for help on using the changeset viewer.