syscall table patch

Paul Mackerras paulus at samba.org
Mon Nov 10 21:49:15 EST 2003


linas at austin.ibm.com writes:

> Can someone apply the patch below, harmonizing the syscall table
> in misc.S with the #define syscalls in unistd.h ?  Its a 'trivial'
> patch; what it really does is to make it easier for other
> non-mainstream kernel extensions to add new system calls
> 'cleanly' to include/asm/unistd.h and arch/ppc64/kernel/misc.S
> without making an ugly hash of things.

Hmmm, I don't like how the patch ends up with a string of lines inside
#if 0 and then another set of lines (for the same series of syscall
numbers) saying sys_ni_syscall.  I would prefer that the #if 0 goes
away and the lines inside that section be changed to look like:

	.llong	.sys_ni_syscall		/* 208, reserved for tkill */

so that we don't end up with the numbers in the comments going from
220 to 208.

We also need to resync the list in 2.4 with 2.5.

> Since several people commented about having a syscall table written
> in C, I also append a 'sample' implementation in C.  There are two
> or three things to note about this:
>
> -- table initialization is now done at runtime, rather than at
>    compile time.

Hmmm this will bloat the size of the kernel image, won't it?  And it
doesn't save us any space at runtime.

> -- C compiler wants function prototypes to be really happy,
>    and this patch doesn't provide them.  Does anybody want them?

That's the trouble with doing it in C.

Paul.

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list