Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 170 → Rev 184

/SPARTAN/trunk/src/proc/scheduler.c
252,6 → 252,13
}
 
/*
* Through the 'THE' structure, we keep track of THREAD, TASK, CPU
* and preemption counter. At this point THE could be coming either
* from THREAD's or CPU's stack.
*/
the_copy(THE, (the_t *) CPU->stack);
 
/*
* We may not keep the old stack.
* Reason: If we kept the old stack and got blocked, for instance, in
* find_best_thread(), the old thread could get rescheduled by another
397,6 → 404,8
printf("cpu%d: tid %d (pri=%d,ticks=%d,nrdy=%d)\n", CPU->id, THREAD->tid, THREAD->pri, THREAD->ticks, CPU->nrdy);
#endif
 
the_copy(THE, (the_t *) THREAD->kstack);
context_restore(&THREAD->saved_context);
/* not reached */
}
/SPARTAN/trunk/src/proc/thread.c
196,6 → 196,8
context_save(&t->saved_context);
context_set(&t->saved_context, FADDR(cushion), t->kstack, THREAD_STACK_SIZE);
the_initialize((the_t *) t->kstack);
 
pri = cpu_priority_high();
t->saved_context.pri = cpu_priority_read();