Subject: Re: Proposal: eliminate all macros in the kernel
To: Thor Lancelot Simon <>
From: Martin Husemann <>
List: tech-kern
Date: 11/20/2005 19:32:46
On Sun, Nov 20, 2005 at 12:39:10PM -0500, Thor Lancelot Simon wrote:
> One particular case I was wondering about was the queue.h macros.

I completely agree with the general idea, and I would suggest to depreciate
code inside macros, but allow excepetions.

I realy love CIRCLEQ_FOREACH style macros (and actually wouldn't call that
"code inside macros"). Same for CALLOUT_INITIALIZER etc.

See the recent libc/gen/vis.c:MAKEEXTRALIST change for another example
of bad macro uses.

It's pretty clear (to me) that this are examples of different classes of
macro usage, but I'm not sure how to qualify the difference formaly.