Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Dec 1997 19:16:08 +0100 (MET)
From:      j@uriah.heep.sax.de (J Wunsch)
To:        freebsd-hackers@freebsd.org
Subject:   Re: New option model (was Re: cvs commit: src/sys/kern kern_exit.c)
Message-ID:  <199712141816.TAA29536@uriah.heep.sax.de>
In-Reply-To: <863ek1xtsl.fsf@bitbox.follo.net>
References:  <199712071816.KAA21840@freefall.freebsd.org> <19971208091729.40125@uriah.heep.sax.de> <863ek4p1tx.fsf_-_@bitbox.follo.net> <199712100013.BAA04827@uriah.heep.sax.de> <863ek1xtsl.fsf@bitbox.follo.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Eivind Eklund <perhaps@yes.no> wrote:

> As far as I can see, the only correct #ifdef's in the kernel .c files
> are #ifdef KERNEL (should be _KERNEL) - everything else should be
> #if to allow #define XXX 1 or 0.  Am I correct?  Should I fix this as
> I do my walkthrough anyway?

Hmm, not sure.  All the boolean current options are #ifdef-evaluated.

What do others think about it?  I don't see an urgent need to change
_this_.

Well, if you were going to spell _KERNEL correctly, by all means, go
ahead! ;)

> For any option that isn't mentioned in a header file, it should be
> fairly simple to move to the new model - a bit of work, but mostly
> just work, not thought.

Yep.  Options mentioned in header files are the actual problem.  Most
of the header files doing so are bogus.

I'm not sure what others think about kernel structs that vary their
size based on different kernel option usage.  IMHO they should die,
since they are highly dangerous, and this danger doesn't justify the
few saved bytes.

>> Except for a few things like #ifdef _KERNEL (still
>> misspelled as #ifdef KERNEL in FreeBSD), #ifdef's should be mostly
>> banned from .h files.
> 
> These look like a lot of non-trivial work to fix :-(

Unfortunately, yes.  If people can help fixing them, this would be
highly appreciated.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712141816.TAA29536>