Subject: Re: Proposal: eliminate all macros in the kernel
To: Thor Lancelot Simon <tls@rek.tjls.com>
From: Tonnerre LOMBARD <tonnerre@thundrix.ch>
List: tech-kern
Date: 11/20/2005 18:22:05
--Qrgsu6vtpU/OV/zm
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline

Salut,

On Sun, Nov 20, 2005 at 12:09:27PM -0500, Thor Lancelot Simon wrote:
> Opinions?

It is mostly a good idea to reduce the amount of macros used, however,
in some cases using an inline function may be overkill, and in some
cases (e.g. macros using ##, initializer macros, etc.) this is simply
impossible. Also, in some cases, conversions of macros to inline
functions may be impractical.

(Also, portability issues to be expected?)

I'd like to ammend your proposal in the following way:

(original)

I propose that we replace all macros in our kernel with inline functions.
This will clean up the mess while at the same time making it easier to
decide whether some of this code should be inlined at all.

Ammendment 1:

Change "all macros" to "as many macros as possbile without losing sanity"

Ammendment 2:

Change "in our kernel" to "in NetBSD" as the same thematic can also
apply to the userland

Ammendment 3:

Change "all macros" to "all macros that execute code inside a function
and don't use stringification"

That's all,

				Tonnerre

--Qrgsu6vtpU/OV/zm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFDgLC9XUVlAbfmNMIRAibGAJ9gDoOQomO7ZB6dSvxaENE0I5vZpACgwavy
HuPyEKHNr5YZ/+54nPEFdJ4=
=03ig
-----END PGP SIGNATURE-----

--Qrgsu6vtpU/OV/zm--