pad argument for mmap/lseek/etc.
Matthew Dillon
dillon at apollo.backplane.com
Wed Oct 10 16:16:38 PDT 2007
:> > 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
More information about the freebsd-current
mailing list