Subject: Re: Proposal: eliminate all macros in the kernel
To: Thor Lancelot Simon <>
From: Tonnerre LOMBARD <>
List: tech-kern
Date: 11/20/2005 18:22:05
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline


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:


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,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.2 (NetBSD)