Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2000 20:46:32 +0300
From:      Valery Zamarayev <qd@hostel8.kiuca.kiev.ua>
To:        questions@freebsd.org
Subject:   Re: some questions about kernel
Message-ID:  <20000425204632.A27154@inetgate.avt>
In-Reply-To: <Pine.GSO.4.10.10004251244190.2414-100000@sun33>
References:  <Pine.GSO.4.10.10004251244190.2414-100000@sun33>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 25, 2000 at 01:03:32PM +0200, Ariel Burbaickij wrote:
> 
>  I try to read some kernel sources of FreeBSD equipped with 
>  book of Lions ,Bach and McKusick.What i saw was rather excessive
>  use of macros of rather complex nature (as for me surely) and
>  whole lot of #ifdefs , iterative #defines and some simmilar stuff
>  I have not seen usage of these progamming methods so far neither
>  im Lions book nor in Minix(sources I have seen so far)
>  So my first and some futher  questions are:
>  1) Why was such excessive usage of macros metohod of choice?
>  2) What is __P macro used in many places in kernel sources?
>     my tip is:It is macro with variable count of arguments(
>     thing I have not seen before,would someone expalin why it was
>     neccesary)Would you expalin this technik to me ?

it seems that __P is for the code to compile with different C compilers.
I don't remember where it is defined. I don't know why this is necessary,
FreeBSD uses one native compiler after all.

>  3) How can i strip the sources from these #ifdefs,#defines and
>     get macros extended(I know i have to use cpp but it will
>     produce a whole lot empty lines bearing no information.
>     Besides,i do not know whether is it possible to use
>     cpp on whole hierarchies of source files)
>  
> My 4 question is about implelemtation of some well-known fuction
> in FreeBSD
> I tried to locate some well-known in some circles surely :))
> functions(e.g. ialloc ,iput,ifree,iget)with some helpful
> tools as gtags and flobal amd got a good dozen of files.
> Same is true about buffer allocating functions.
> So the questions is:
> 4) Maybe somecatalogue is maintained with information about 
>    where(in what file)each function is definied?Some functions
>    were probably re-named so maybe some another catalogue exists with
>    mapping between old-style names to new-style names ?
>    With old-style I mean books of Bach , Lion and Tannenbaum

there is a hypertext version of the FreeBSD kernel source,
I don't remember the URL, but www.freebsd.org has a link

-- 
Valery Zamarayev



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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