{
while(1) {
if (need_resched()) {
- sti();
+ local_irq_enable();
__asm__("sleep");
- cli();
+ local_irq_disable();
}
schedule();
}
void show_regs(struct pt_regs * regs)
{
- printk("\n");
- printk("PC: %08lx Status: %02x\n",
+ printk("\nPC: %08lx Status: %02x",
regs->pc, regs->ccr);
- printk("ORIG_ER0: %08lx ER0: %08lx ER1: %08lx\n",
+ printk("\nORIG_ER0: %08lx ER0: %08lx ER1: %08lx",
regs->orig_er0, regs->er0, regs->er1);
- printk("ER2: %08lx ER3: %08lx ER4: %08lx ER5: %08lx\n",
+ printk("\nER2: %08lx ER3: %08lx ER4: %08lx ER5: %08lx",
regs->er2, regs->er3, regs->er4, regs->er5);
- printk("ER6' %08lx ",regs->er6);
+ printk("\nER6' %08lx ",regs->er6);
if (user_mode(regs))
printk("USP: %08lx\n", rdusp());
else
return error;
}
-/*
- * These bracket the sleeping functions..
- */
-#define first_sched ((unsigned long) scheduling_functions_start_here)
-#define last_sched ((unsigned long) scheduling_functions_end_here)
-
unsigned long thread_saved_pc(struct task_struct *tsk)
{
return ((struct pt_regs *)tsk->thread.esp0)->pc;
fp >= 8184+stack_page)
return 0;
pc = ((unsigned long *)fp)[1];
- if (pc < first_sched || pc >= last_sched)
+ if (!in_sched_functions(pc))
return pc;
fp = *(unsigned long *) fp;
} while (count++ < 16);