Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 212 → Rev 213

/SPARTAN/trunk/src/proc/scheduler.c
135,7 → 135,7
spinlock_unlock(&r->lock);
continue;
}
 
/* avoid deadlock with relink_rq() */
if (!spinlock_trylock(&CPU->lock)) {
/*
412,6 → 412,9
printf("cpu%d: tid %d (pri=%d,ticks=%d,nrdy=%d)\n", CPU->id, THREAD->tid, THREAD->pri, THREAD->ticks, CPU->nrdy);
#endif
 
/*
* Copy the knowledge of CPU, TASK, THREAD and preemption counter to thread's stack.
*/
the_copy(THE, (the_t *) THREAD->kstack);
context_restore(&THREAD->saved_context);
/SPARTAN/trunk/src/proc/thread.c
75,9 → 75,9
void (*f)(void *) = THREAD->thread_code;
void *arg = THREAD->thread_arg;
 
/* this is where each thread wakes up after its creation */
before_thread_runs();
 
/* this is where each thread wakes up after its creation */
spinlock_unlock(&THREAD->lock);
cpu_priority_low();
 
/SPARTAN/trunk/arch/mips/src/exception.c
39,7 → 39,14
__u32 epc;
__u32 epc_shift = 0;
pri_t pri;
 
/*
* NOTE ON OPERATION ORDERING
*
* On entry, cpu_priority_high() must be called before exception bit is cleared.
* On exit, exception bit must be set before cpu_priority_restore() is called.
*/
 
pri = cpu_priority_high();
epc = cp0_epc_read();
cp0_status_write(cp0_status_read() & ~ cp0_status_exl_exception_bit);