Re: what does preprocessor test "__ASSEMBLY__" mean?

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

 



On Mon, 4 Jun 2007, Octavian Purdila wrote:

> 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.

i suspected as much, i just wanted to make sure, thanks.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

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


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux