Subversion Repositories HelenOS-historic

Rev

Rev 1187 | Rev 1221 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1187 Rev 1196
Line 447... Line 447...
447
    }
447
    }
448
 
448
 
449
    THREAD->state = Running;
449
    THREAD->state = Running;
450
 
450
 
451
#ifdef SCHEDULER_VERBOSE
451
#ifdef SCHEDULER_VERBOSE
452
    printf("cpu%d: tid %d (priority=%d,ticks=%d,nrdy=%d)\n", CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks, atomic_get(&CPU->nrdy));
452
    printf("cpu%d: tid %d (priority=%d,ticks=%lld,nrdy=%ld)\n", CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks, atomic_get(&CPU->nrdy));
453
#endif  
453
#endif  
454
 
454
 
455
    /*
455
    /*
456
     * Some architectures provide late kernel PA2KA(identity)
456
     * Some architectures provide late kernel PA2KA(identity)
457
     * mapping in a page fault handler. However, the page fault
457
     * mapping in a page fault handler. However, the page fault
Line 567... Line 567...
567
                /*
567
                /*
568
                 * Ready t on local CPU
568
                 * Ready t on local CPU
569
                 */
569
                 */
570
                spinlock_lock(&t->lock);
570
                spinlock_lock(&t->lock);
571
#ifdef KCPULB_VERBOSE
571
#ifdef KCPULB_VERBOSE
572
                printf("kcpulb%d: TID %d -> cpu%d, nrdy=%d, avg=%d\n", CPU->id, t->tid, CPU->id, atomic_get(&CPU->nrdy), atomic_get(&nrdy) / config.cpu_active);
572
                printf("kcpulb%d: TID %d -> cpu%d, nrdy=%ld, avg=%nd\n", CPU->id, t->tid, CPU->id, atomic_get(&CPU->nrdy), atomic_get(&nrdy) / config.cpu_active);
573
#endif
573
#endif
574
                t->flags |= X_STOLEN;
574
                t->flags |= X_STOLEN;
575
                t->state = Entering;
575
                t->state = Entering;
576
                spinlock_unlock(&t->lock);
576
                spinlock_unlock(&t->lock);
577
   
577
   
Line 631... Line 631...
631
 
631
 
632
        if (!cpus[cpu].active)
632
        if (!cpus[cpu].active)
633
            continue;
633
            continue;
634
 
634
 
635
        spinlock_lock(&cpus[cpu].lock);
635
        spinlock_lock(&cpus[cpu].lock);
636
        printf("cpu%d: address=%P, nrdy=%d, needs_relink=%d\n",
636
        printf("cpu%d: address=%P, nrdy=%ld, needs_relink=%ld\n",
637
               cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy), cpus[cpu].needs_relink);
637
               cpus[cpu].id, &cpus[cpu], atomic_get(&cpus[cpu].nrdy), cpus[cpu].needs_relink);
638
       
638
       
639
        for (i=0; i<RQ_COUNT; i++) {
639
        for (i=0; i<RQ_COUNT; i++) {
640
            r = &cpus[cpu].rq[i];
640
            r = &cpus[cpu].rq[i];
641
            spinlock_lock(&r->lock);
641
            spinlock_lock(&r->lock);