[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what does preprocessor test "__ASSEMBLY__" mean?



On Monday 04 June 2007 11:26, Robert P. J. Day wrote:
>   i can sort of see what it represents, but what's the exact meaning
> of checking for that preprocessor symbol?  thanks.
>

Some of the headers are included in assembler source.  __ASSEMBLY__ keeps out 
C constructs when "compiling" assembler sources.

For example, ./arch/i386/relocate_kernel.S is including <asm-i386/page.h>,  
which has all kinds of C constructs like typedefs, functions declarations, 
etc. that do not make sense in assembly. Nethertheless, there are some 
usefull macro-definitions like PAGE_SHIT, PAGE_SIZE, etc. which we want to 
use even in assembly.

tavi

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ