From owner-freebsd-questions Tue Apr 25 4: 3:15 2000 Delivered-To: freebsd-questions@freebsd.org Received: from merkur.hrz.uni-giessen.de (merkur.hrz.uni-giessen.de [134.176.2.12]) by hub.freebsd.org (Postfix) with ESMTP id AAA0037B737 for ; Tue, 25 Apr 2000 04:03:12 -0700 (PDT) (envelope-from Ariel.Burbaickij@mni.fh-giessen.de) Received: from caspar.mni.fh-giessen.de by merkur.hrz.uni-giessen.de with ESMTP for questions@freebsd.org; Tue, 25 Apr 2000 13:03:26 +0200 Received: from sun33.mni.fh-giessen.de ([134.176.183.133]) by caspar.mni.fh-giessen.de with esmtp (Exim 2.12 #6) id 12k376-00070G-00 for questions@freebsd.org; Tue, 25 Apr 2000 13:02:44 +0200 Received: from localhost (hg9456@localhost) by sun33.mni.fh-giessen.de (8.9.3+Sun/8.8.8) with ESMTP id NAA02506 for ; Tue, 25 Apr 2000 13:03:33 +0200 (MET DST) X-Authentication-Warning: sun33.mni.fh-giessen.de: hg9456 owned process doing -bs Date: Tue, 25 Apr 2000 13:03:32 +0200 (MET DST) From: Ariel Burbaickij X-Sender: hg9456@sun33 To: questions@freebsd.org Subject: some questions about kernel Message-Id: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 ? 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 Kind regards, Ariel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message