Date: Wed, 10 Oct 2007 16:05:47 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: John Baldwin <jhb@freebsd.org> Cc: Kostik Belousov <kostikbel@gmail.com>, Roman Divacky <rdivacky@freebsd.org>, freebsd-current@freebsd.org, current@freebsd.org, peter@freebsd.org Subject: Re: pad argument for mmap/lseek/etc. Message-ID: <200710102305.l9AN5lHn084254@apollo.backplane.com> References: <20071007140237.GA44735@freebsd.org> <20071008153106.GN2180@deviant.kiev.zoral.com.ua> <20071008172545.GA91406@freebsd.org> <200710101714.23286.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
:> > of fixing them in whole kernel.
:>
:> I also support this idea... does anyone have an argument against or should I
:> just provide a patch (removing those definitions)
:
:Many people (myself included) find it handy to have the uap structure
:definition with the function.
:
:--
:John Baldwin
What I did in DragonFly a long time ago was remove the #ifdef and struct
defintion entirely and simply put the UAP arguments in comments. i.e.:
/*
* umount_args(char *path, int flags)
*/
/* ARGSUSED */
int
sys_unmount(struct unmount_args *uap)
...
/*
* mmap_args(void *addr, size_t len, int prot, int flags, int fd,
* long pad, off_t pos)
*/
...
int
sys_mmap(struct mmap_args *uap)
...
I had found that not only were the structure definitions out of date,
there were many system calls that didn't have them at all as well as
other inconsistencies.
I also prefixed all system call procedure definitions in the kernel
with 'sys_' which got rid of most of the conflicts between kernel
function names and standard library headers. That was so the virtual
kernel could link against libc but even without a vkernel build I
think it's a good idea to get rid of the conflicts.
-Matt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710102305.l9AN5lHn084254>
