Subversion Repositories HelenOS

Rev

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

Rev 2089 Rev 2118
Line 142... Line 142...
142
        if (!THREAD->saved_fpu_context) {
142
        if (!THREAD->saved_fpu_context) {
143
            /* Might sleep */
143
            /* Might sleep */
144
            spinlock_unlock(&THREAD->lock);
144
            spinlock_unlock(&THREAD->lock);
145
            spinlock_unlock(&CPU->lock);
145
            spinlock_unlock(&CPU->lock);
146
            THREAD->saved_fpu_context =
146
            THREAD->saved_fpu_context =
147
                slab_alloc(fpu_context_slab, 0);
147
                (fpu_context_t *) slab_alloc(fpu_context_slab, 0);
148
            /* We may have switched CPUs during slab_alloc */
148
            /* We may have switched CPUs during slab_alloc */
149
            goto restart;
149
            goto restart;
150
        }
150
        }
151
        fpu_init();
151
        fpu_init();
152
        THREAD->fpu_context_exists = 1;
152
        THREAD->fpu_context_exists = 1;
Line 535... Line 535...
535
 *
535
 *
536
 */
536
 */
537
void kcpulb(void *arg)
537
void kcpulb(void *arg)
538
{
538
{
539
    thread_t *t;
539
    thread_t *t;
540
    int count, average, i, j, k = 0;
540
    int count, average, j, k = 0;
-
 
541
    unsigned int i;
541
    ipl_t ipl;
542
    ipl_t ipl;
542
 
543
 
543
    /*
544
    /*
544
     * Detach kcpulb as nobody will call thread_join_timeout() on it.
545
     * Detach kcpulb as nobody will call thread_join_timeout() on it.
545
     */
546
     */
Line 687... Line 688...
687
 
688
 
688
/** Print information about threads & scheduler queues */
689
/** Print information about threads & scheduler queues */
689
void sched_print_list(void)
690
void sched_print_list(void)
690
{
691
{
691
    ipl_t ipl;
692
    ipl_t ipl;
692
    int cpu,i;
693
    unsigned int cpu, i;
693
    runq_t *r;
694
    runq_t *r;
694
    thread_t *t;
695
    thread_t *t;
695
    link_t *cur;
696
    link_t *cur;
696
 
697
 
697
    /* We are going to mess with scheduler structures,
698
    /* We are going to mess with scheduler structures,
698
     * let's not be interrupted */
699
     * let's not be interrupted */
699
    ipl = interrupts_disable();
700
    ipl = interrupts_disable();
700
    for (cpu=0;cpu < config.cpu_count; cpu++) {
701
    for (cpu = 0; cpu < config.cpu_count; cpu++) {
701
 
702
 
702
        if (!cpus[cpu].active)
703
        if (!cpus[cpu].active)
703
            continue;
704
            continue;
704
 
705
 
705
        spinlock_lock(&cpus[cpu].lock);
706
        spinlock_lock(&cpus[cpu].lock);