Subject: Proposal: eliminate all macros in the kernel
To: None <>
From: Thor Lancelot Simon <>
List: tech-kern
Date: 11/20/2005 12:09:27
There are a number of problems caused by the extensive use of macros in
our kernel.

First, they can significantly expand code size, which can have a negative
performance impact.

Second, they make debugging difficult: the debugger can't call them, and
it can be highly unobvious what code one's stepping through.

Third, they are ugly, prone to multiple definition (see FROMBCD), etc.

Fourth, they mean that we have substantial chunks of code in some header
files, where it really doesn't belong.

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.


 Thor Lancelot Simon	                            

"The inconsistency is startling, though admittedly, if consistency is to be
 abandoned or transcended, there is no problem."		- Noam Chomsky