|
From: Jeff D. <jd...@ka...> - 2000-05-03 17:36:02
|
> > execute_syscall is now in sys-*, rather than kernel/syscall_kern.c.
> That's a bit of a shame - most of the code is fine for PPC too, except
> for the cases dealing with i386-only syscalls. I'd personally prefer
> to have an #ifdef or two rather than copying most of it verbatim for
> the other architecture(s).
I just looked at the gcc docs and it turns out there's a syntax for
initializing arrays that lets you explicitly specify indexes:
int a[6] = { [4] 29, [2] = 15 };
So, for now, write your own execute_syscall. I'll rework it into something
which has a syscall table that says things like:
{ [__NR_exit] sys_exit,
[__NR_fork] sys_fork,
...
ARCH_SYSCALLS }
And the i386 ARCH_SYSCALLS would have
[__NR_vm86] sys_ni,
...
and all the others that don't exist on ppc.
And yours would have whatever things are different on ppc.
Jeff
|