Subversion Repositories HelenOS

Rev

Rev 777 | Rev 786 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 777 Rev 783
Line 135... Line 135...
135
    r->n++;
135
    r->n++;
136
    spinlock_unlock(&r->lock);
136
    spinlock_unlock(&r->lock);
137
 
137
 
138
    atomic_inc(&nrdy);
138
    atomic_inc(&nrdy);
139
    avg = atomic_get(&nrdy) / config.cpu_active;
139
    avg = atomic_get(&nrdy) / config.cpu_active;
140
 
-
 
141
    spinlock_lock(&cpu->lock);
140
    atomic_inc(&cpu->nrdy);
142
    if ((++cpu->nrdy) > avg) {
-
 
143
        /*
-
 
144
         * If there are idle halted CPU's, this will wake them up.
-
 
145
         */
-
 
146
        ipi_broadcast(VECTOR_WAKEUP_IPI);
-
 
147
    }  
-
 
148
    spinlock_unlock(&cpu->lock);
-
 
149
 
141
 
150
    interrupts_restore(ipl);
142
    interrupts_restore(ipl);
151
}
143
}
152
 
144
 
153
 
145