Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jun 2010 11:48:26 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Matthew Fleming <mdf356@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r209578 - head/sys/sys
Message-ID:  <20100629084826.GH13238@deviant.kiev.zoral.com.ua>
In-Reply-To: <AANLkTilWzaFxFN1gNPVmj_Fwm6j_nmM06eXtEDVHZgjS@mail.gmail.com>
References:  <201006281759.o5SHxkoR076207@svn.freebsd.org> <AANLkTilWzaFxFN1gNPVmj_Fwm6j_nmM06eXtEDVHZgjS@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--HhvjdBU+Fnm6rrzO
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 28, 2010 at 02:07:02PM -0700, Matthew Fleming wrote:
> On Mon, Jun 28, 2010 at 10:59 AM, Konstantin Belousov <kib@freebsd.org> w=
rote:
> > Author: kib
> > Date: Mon Jun 28 17:59:45 2010
> > New Revision: 209578
> > URL: http://svn.freebsd.org/changeset/base/209578
> >
> > Log:
> > =9AUse C99 initializers for the struct sysent generated by MAKE_SYSENT(=
).
> >
> > =9AMFC after: =9A =9A1 week
> >
> > Modified:
> > =9Ahead/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 =9A =9A =9A Mon Jun 28 17:45:00 2010 =9A =9A =
=9A =9A(r209577)
> > +++ head/sys/sys/sysent.h =9A =9A =9A Mon Jun 28 17:59:45 2010 =9A =9A =
=9A =9A(r209578)
> > @@ -144,10 +144,10 @@ struct syscall_module_data {
> >
> > =9A#define =9A =9A =9A =9AMAKE_SYSENT(syscallname) =9A =9A =9A =9A =9A =
=9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A\
> > =9Astatic struct sysent syscallname##_sysent =3D { =9A =9A =9A =9A =9A =
=9A =9A =9A =9A\
> > - =9A =9A =9A (sizeof(struct syscallname ## _args ) =9A =9A =9A =9A =9A=
 =9A =9A =9A =9A \
> > + =9A =9A =9A .sy_narg =3D (sizeof(struct syscallname ## _args ) =9A =
=9A =9A =9A\
> > =9A =9A =9A =9A =9A =9A/ sizeof(register_t)), =9A =9A =9A =9A =9A =9A =
=9A =9A =9A =9A =9A =9A =9A =9A =9A\
> > - =9A =9A =9A (sy_call_t *)& syscallname, =9A =9A =9A =9A =9A =9A =9A =
=9A =9A =9A =9A =9A =9A =9A \
> > - =9A =9A =9A SYS_AUE_##syscallname =9A =9A =9A =9A =9A =9A =9A =9A =9A=
 =9A =9A =9A =9A =9A =9A =9A =9A \
> > + =9A =9A =9A .sy_call =3D (sy_call_t *)& syscallname, =9A =9A =9A =9A =
=9A =9A =9A =9A =9A\
> > + =9A =9A =9A .sy_auevent =3D SYS_AUE_##syscallname, =9A =9A =9A =9A =
=9A =9A =9A =9A =9A =9A\
> > =9A}
> >
> > =9A#define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) =9A =9A \
> >
>=20
> 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.
>=20
> 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.

--HhvjdBU+Fnm6rrzO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkwps1oACgkQC3+MBN1Mb4jGsQCdFkZBqsnJ+BVTZzJXRaOXtUor
ZJ0An0OHU8OF0Xh+UxB4u8s8c+CkMJon
=evKS
-----END PGP SIGNATURE-----

--HhvjdBU+Fnm6rrzO--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100629084826.GH13238>