From owner-freebsd-current@FreeBSD.ORG Wed Oct 10 23:16:38 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB8E116A421; Wed, 10 Oct 2007 23:16:38 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6239C13C468; Wed, 10 Oct 2007 23:16:38 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.14.1/8.13.7) with ESMTP id l9AN5lEm084255; Wed, 10 Oct 2007 16:05:47 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.14.1/8.13.4/Submit) id l9AN5lHn084254; Wed, 10 Oct 2007 16:05:47 -0700 (PDT) Date: Wed, 10 Oct 2007 16:05:47 -0700 (PDT) From: Matthew Dillon Message-Id: <200710102305.l9AN5lHn084254@apollo.backplane.com> To: John Baldwin References: <20071007140237.GA44735@freebsd.org> <20071008153106.GN2180@deviant.kiev.zoral.com.ua> <20071008172545.GA91406@freebsd.org> <200710101714.23286.jhb@freebsd.org> Cc: Kostik Belousov , Roman Divacky , freebsd-current@freebsd.org, current@freebsd.org, peter@freebsd.org Subject: Re: pad argument for mmap/lseek/etc. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2007 23:16:38 -0000 :> > 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