Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/scheduler.c

    r935e28c rb2fa1204  
    5252#include <atomic.h>
    5353#include <synch/spinlock.h>
    54 #include <synch/workqueue.h>
    55 #include <synch/rcu.h>
    5654#include <config.h>
    5755#include <context.h>
     
    6361#include <cpu.h>
    6462#include <print.h>
     63#include <log.h>
    6564#include <debug.h>
    6665#include <stacktrace.h>
    67 #include <cpu.h>
    6866
    6967static void scheduler_separated_stack(void);
     
    8987{
    9088        before_thread_runs_arch();
    91         rcu_before_thread_runs();
    9289       
    9390#ifdef CONFIG_FPU_LAZY
     
    9693        else
    9794                fpu_disable();
    98 #else
     95#elif defined CONFIG_FPU
    9996        fpu_enable();
    10097        if (THREAD->fpu_context_exists)
     
    130127static void after_thread_ran(void)
    131128{
    132         workq_after_thread_ran();
    133         rcu_after_thread_ran();
    134129        after_thread_ran_arch();
    135130}
     
    224219                goto loop;
    225220        }
    226 
    227         ASSERT(!CPU->idle);
    228221       
    229222        unsigned int i;
     
    335328                THREAD->kcycles += get_cycle() - THREAD->last_cycle;
    336329               
    337 #ifndef CONFIG_FPU_LAZY
     330#if (defined CONFIG_FPU) && (!defined CONFIG_FPU_LAZY)
    338331                fpu_context_save(THREAD->saved_fpu_context);
    339332#endif
     
    405398        ASSERT((!THREAD) || (irq_spinlock_locked(&THREAD->lock)));
    406399        ASSERT(CPU != NULL);
    407         ASSERT(interrupts_disabled());
    408400       
    409401        /*
     
    429421               
    430422                case Exiting:
    431                         rcu_thread_exiting();
    432423repeat:
    433424                        if (THREAD->detached) {
     
    527518       
    528519#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,
    531523            THREAD->ticks, atomic_get(&CPU->nrdy));
    532524#endif
     
    673665                               
    674666#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,
    677670                                    CPU->id, atomic_get(&CPU->nrdy),
    678671                                    atomic_get(&nrdy) / config.cpu_active);
     
    749742                       
    750743                        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) {
    754746                                printf("%" PRIu64 "(%s) ", thread->tid,
    755747                                    thread_states[thread->state]);
Note: See TracChangeset for help on using the changeset viewer.