Subversion Repositories HelenOS-historic

Rev

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

Rev 68 Rev 73
Line 265... Line 265...
265
                spinlock_unlock(&THREAD->lock);
265
                spinlock_unlock(&THREAD->lock);
266
               
266
               
267
                spinlock_lock(&threads_lock);
267
                spinlock_lock(&threads_lock);
268
                list_remove(&THREAD->threads_link);
268
                list_remove(&THREAD->threads_link);
269
                spinlock_unlock(&threads_lock);
269
                spinlock_unlock(&threads_lock);
-
 
270
 
-
 
271
                spinlock_lock(&THREAD->cpu->lock);
-
 
272
                if(THREAD->cpu->arch.fpu_owner==THREAD) THREAD->cpu->arch.fpu_owner=NULL;
-
 
273
                spinlock_unlock(&THREAD->cpu->lock);
-
 
274
 
270
               
275
               
271
                free(THREAD);
276
                free(THREAD);
272
               
277
               
273
                break;
278
                break;
274
               
279
               
Line 425... Line 430...
425
            while (l != &r->rq_head) {
430
            while (l != &r->rq_head) {
426
                t = list_get_instance(l, thread_t, rq_link);
431
                t = list_get_instance(l, thread_t, rq_link);
427
                /*
432
                /*
428
                     * We don't want to steal CPU-wired threads neither threads already stolen.
433
                     * We don't want to steal CPU-wired threads neither threads already stolen.
429
                 * The latter prevents threads from migrating between CPU's without ever being run.
434
                 * The latter prevents threads from migrating between CPU's without ever being run.
-
 
435
                     * We don't want to steal threads whose FPU context is still in CPU
430
                     */
436
                 */
431
                spinlock_lock(&t->lock);
437
                spinlock_lock(&t->lock);
432
                if (!(t->flags & (X_WIRED | X_STOLEN))) {
438
                if ( (!(t->flags & (X_WIRED | X_STOLEN))) && (!(t->fpu_context_engaged)) ) {
433
                    /*
439
                    /*
434
                     * Remove t from r.
440
                     * Remove t from r.
435
                     */
441
                     */
436
 
442
 
437
                    spinlock_unlock(&t->lock);
443
                    spinlock_unlock(&t->lock);