On Mon, Sep 26, 2005 at 02:05:13PM -0400, Allan Graves wrote:
> Let me know what you want changed, jeff,
OK, you asked for it :-)
> i set vim to hardtabs, i hope
> the white space comes out okay, don't want to get you in trouble again.
The tabs look OK this time, thanks.
> i ran this in both frame pointer and no frame pointer mode.
+union uml_pt_regs *get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
+ return uml_regs;
This should just be a void, there's usually no sense in returning an argument.
I see why you do it this way, but see my comments later.
//jmp_buf * jmpbuf=(jmp_buf *)buffer;
Just get rid of commented code - act like you mean it :-)
You should have gotten rid of that.
+#define KSTK_EIP(tsk) UPT_REG(get_thread_regs(&tsk->thread.sysrq_regs, tsk->thread.mode.skas.switch_buf), EIP);
+#define KSTK_ESP(tsk) UPT_REG(get_thread_regs(&tsk->thread.sysrq_regs, tsk->thread.mode.skas.switch_buf), UESP);
+#define KSTK_EBP(tsk) UPT_REG(get_thread_regs(&tsk->thread.sysrq_regs, tsk->thread.mode.skas.switch_buf), EBP);
With this, I would prefer something like
static inline unsigned long KSTK_EIP(struct task_struct *task)
union uml_pt_regs regs;
No need to make the thread structure any larger than it needs to be. Plus
the typechecking is better with a function than a macro.
Also, is KSTK_EBP needed? It wasn't defined before, and yet UML still
And I would make the tt mode versions return obviously bogus values
(0x00badbad, maybe :-), rather than non-obviously bogus values.