Subject: Re: Basic coding question
To: None <>
From: tiger shiao <>
List: current-users
Date: 05/30/2001 12:40:16
Thanks a lot!! I greped NetBSD:/usr/src/sys/* and found ipfilter use it 
intensively which is the one i'm interested in porting, those KERNELs 
conflict with other KERNELs existed in my OS kernel sources...

>From: Manuel Bouyer <>
>To: tiger shiao <>
>Subject: Re: Bacis coding question
>Date: Wed, 30 May 2001 17:46:38 +0200
>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 
> > 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 
> > 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. 

Get your FREE download of MSN Explorer at