Subject: Re: kevent(2) under COMPAT_NETBSD32
To: Martin Husemann <martin@duskware.de>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 07/13/2005 23:23:52
--Y51z1SGMnxVzkhDv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wed, Jul 13, 2005 at 03:47:02PM +0200, Martin Husemann wrote:
> On Wed, Jul 13, 2005 at 03:42:05PM +0200, Quentin Garnier wrote:
> > The only other sane way of having a netbsd32 version of kevent(2) is
> > through rewriting everything (sys_kevent and kqueue_scan). I don't
> > like that solution because with time the native version will change
> > and the netbsd32 will start being different.
>=20
> Can we replace function calls be preproccessor magic, move sys_kevent and
> kqueue_scan into a template file - trading code size for runtime?
I've just had a peek at the FreeBSD kern_event.c code as it is currently
in their tree.
They basically do the same stuff that I do in my patch, and their code
points me to a stupid error in mine, which malloc() at each pass of
netbsd32_kevent_fetch_changes and netbsd32_kevent_put_event.
I'll rework that to first allocate the buffer, and then pass a pointer
to a structure containting the necessary state.
--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.
--Y51z1SGMnxVzkhDv
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iQEVAwUBQtWGaNgoQloHrPnoAQIHxgf+N7P+96CgukEFB8cps8gG2dwbY8dK14Sq
/iuGVaS9T+57lXDFViJLvC7UZJ29Or3vDyGRI6K70xFMhqd3VF3Sq9+K3kX85rid
2nxLkWuQGTINgCW4XabnQl/i4hZvlJ38xXprE7sak+qINwuWdX+v63EOyjr5/1wS
/Y4ThDhmETBQYSLBYQ58qq97GYRf6bk3oH3lFr2AX9rKNtm84iO4gmHORkyRu6pe
pzJ6PXfHWhEgRLaOT0l/V/eZLKJx1W47kEYVzlVfxddTK2pd7NLoSrk7m08bbHOE
ZvKyVbcFy7aUDSqw0Mprww9o0AaXqeFo41Z81pT4Vd4FnxPbkUVTrw==
=OUB/
-----END PGP SIGNATURE-----
--Y51z1SGMnxVzkhDv--