Skip to contentSkip to conversation

Universal Regs address

DISCUSSION george anzinger 1 participant 1 message Feb 25, 2002

lore
Share & tools
lore
#0 lore raw

&regs is needed by the deliver signal code and currently is supplied by the system call interface to the system calls that need it. This requires that any new system call to have (at least in some archs) special code in the system call trap area to pass the &regs, or does it?

In an arch in which the call stack address decreases as calls are made, isn't:

&regs = stack_base+size of(stack) - size of(struct regs);

an for stacks that increase:

&regs = stack_base;

The only time this would not be true, unless I am missing something, is if the system call is made from kernel space. Is this an issue? Do we ever need &regs if called from the kernel? If not, can we tell the call was from the kernel?

comments?

Signature · 3 lines
George           [email protected]
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/