From owner-svn-src-all@FreeBSD.ORG Tue Jun 29 13:46:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3543106566C; Tue, 29 Jun 2010 13:46:23 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id 03D268FC0C; Tue, 29 Jun 2010 13:46:22 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 4so238939eyf.3 for ; Tue, 29 Jun 2010 06:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=u/5+yXUSUr6zDeeL4bDwU30vRV/1zwzljOaL1R0sFoQ=; b=j5cgybXTN0rJZLtmSllEwsBk+/xAeJ2d4P+UbIxcXwqJTosH+AhoOOiaXQK1LXHJiH eLpcgI89LKGxHu1u8j2af/famAKUmWuO2SDy6Ul6bFm6K0Mq5Ne+8hbBFblZJRMdvc9k uPo04N8c05HqyyHNdVMtc635TCMKAnyVynglc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=lynd8epKHSgjbntHRel+neD+XEa3qwmpqSSpS3IK9kroFR5qWemGQYtVt3eUcpd6GF kIeLLBEdbGLWc0FFVEwZXSMUNqzQ1KBg3dDyHToIdcCApqSO14YWLUoftFBiwXZ+LhbU NqqE9xUTel0LKkjwprquSbAj1cbYWbt/pN1Mg= MIME-Version: 1.0 Received: by 10.213.113.202 with SMTP id b10mr2430762ebq.77.1277819175027; Tue, 29 Jun 2010 06:46:15 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.42.5.78 with HTTP; Tue, 29 Jun 2010 06:46:14 -0700 (PDT) In-Reply-To: <20100629084826.GH13238@deviant.kiev.zoral.com.ua> References: <201006281759.o5SHxkoR076207@svn.freebsd.org> <20100629084826.GH13238@deviant.kiev.zoral.com.ua> Date: Tue, 29 Jun 2010 13:46:14 +0000 X-Google-Sender-Auth: _RN8o0D2fZ5Do05HMHLLh3RlsWw Message-ID: From: mdf@FreeBSD.org To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r209578 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 13:46:24 -0000 2010/6/29 Kostik Belousov : > On Mon, Jun 28, 2010 at 02:07:02PM -0700, Matthew Fleming wrote: >> On Mon, Jun 28, 2010 at 10:59 AM, Konstantin Belousov = wrote: >> > Author: kib >> > Date: Mon Jun 28 17:59:45 2010 >> > New Revision: 209578 >> > URL: http://svn.freebsd.org/changeset/base/209578 >> > >> > Log: >> > =A0Use C99 initializers for the struct sysent generated by MAKE_SYSENT= (). >> > >> > =A0MFC after: =A0 =A01 week >> > >> > Modified: >> > =A0head/sys/sys/sysent.h >> > >> > Modified: head/sys/sys/sysent.h >> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >> > --- head/sys/sys/sysent.h =A0 =A0 =A0 Mon Jun 28 17:45:00 2010 =A0 =A0= =A0 =A0(r209577) >> > +++ head/sys/sys/sysent.h =A0 =A0 =A0 Mon Jun 28 17:59:45 2010 =A0 =A0= =A0 =A0(r209578) >> > @@ -144,10 +144,10 @@ struct syscall_module_data { >> > >> > =A0#define =A0 =A0 =A0 =A0MAKE_SYSENT(syscallname) =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ >> > =A0static struct sysent syscallname##_sysent =3D { =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0\ >> > - =A0 =A0 =A0 (sizeof(struct syscallname ## _args ) =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 \ >> > + =A0 =A0 =A0 .sy_narg =3D (sizeof(struct syscallname ## _args ) =A0 = =A0 =A0 =A0\ >> > =A0 =A0 =A0 =A0 =A0 =A0/ sizeof(register_t)), =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ >> > - =A0 =A0 =A0 (sy_call_t *)& syscallname, =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ >> > - =A0 =A0 =A0 SYS_AUE_##syscallname =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ >> > + =A0 =A0 =A0 .sy_call =3D (sy_call_t *)& syscallname, =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0\ >> > + =A0 =A0 =A0 .sy_auevent =3D SYS_AUE_##syscallname, =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0\ >> > =A0} >> > >> > =A0#define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) =A0 =A0 = \ >> > >> >> This change prevents (I assume) the use of MAKE_SYSENT() in a C++ >> kernel module, as C++ does not support the .name =3D value style of >> named initializers. >> >> gcc does allow name: value initializers and it's easy to patch it to >> accept .name =3D value, but it's not strictly conforming C++ code >> anymore. > I do not mind reverting this, I think it would be better then > having #ifdef __cplusplus and two definitions. I really wanted to > have a way to provide sparce initializator for the struct sysent. > I managed to not require it for r209579. I agree it's really handy to have sparse initializers; I just haven't thought of a way to do that and continue to allow 3rd party c++ modules. Perhaps we'll get a new c++ standard soon that supports this syntax. :-) Thanks, matthew