Re: increase the number of system call parameters

From: Matti Aarnio (matti.aarnio@zmailer.org)
Date: Mon Oct 22 2001 - 06:57:11 EST


On Mon, Oct 22, 2001 at 01:48:26PM +0200, Roar Thronęs wrote:
> Hi
>
> How do you increase the number of system call parameters, and how many
> can you at most have?
> Would up to 12 parameters be possible, and how?

  Why ? Would it not make sense to have 2-3 params, one of them
being a pointer to a structure passing complicated dataset ?
(And first of the structure elements being version number so you
 can version the syscall, e.g. add more things/differently structured
 things latter -- and remember to supply specific errno which is
 telling that particular version is not understood by the kernel.)

For example the kernel does not have mmap64(), but it has mmap2()
which passes the large number of parameters in a structure, and the
libc has a wrapper function implementing mmap64() call API.

At register-rich systems that is not absolutely necessary, but at
register-starved things, like i386, you have no real other way.

> --
> -Roar Thronęs

/Matti Aarnio
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 23 2001 - 21:00:30 EST