[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-current-users
Subject:    Re: Bacis coding question
From:       Manuel Bouyer <bouyer () antioche ! lip6 ! fr>
Date:       2001-05-30 15:46:38
[Download RAW message or body]

On Wed, May 30, 2001 at 09:27:54AM -0500, tiger shiao wrote:
> I have been stuck by a basic coding question for two days, wish somebody can 
> help me out...
> 
> in NetBSD, (or any other xBSD), KERNEL macro is scattered in many source 
> codes, my question is what they're designed for, when i should #def it and 
> when i should #undef it. I don't believe they're designed for in-kernel 
> codes only, since many kernel code doesn't need this Macro to compile...
> 
> Shed me a light please.

This macro (_KERNEL for NetBSD, I don't know for others) is used mostly in
kernel header files which are shared with userland (e.g. sys/*.h,
arch/*/include/*.h), to expose some prototype or definitions only for
kernel soures. This macro is defined by the kernel build process, on the
compiler command line (-D_KERNEL)

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic