Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 May 2001 10:26:49 -0700
From:      Peter Wemm <peter@wemm.org>
To:        SJ <sandejain@rocketmail.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: two general questions 
Message-ID:  <20010524172649.721AE380C@overcee.netplex.com.au>
In-Reply-To: <20010524161944.85795.qmail@web13408.mail.yahoo.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
SJ wrote:
> Hi,
> I have a couple of general questions regarding the
> kernel: I'll appreciate any help whatsoever in this
> regard.
>  
> 1) In the ioconf.c file I see an entry for a resource 
> 
>    as:
>   { "at", RES_STRING,     { (long)"isa" }},
>                             ^^^^^^^
>    Shouldnt (long) be (char*) ?

No.  The type of the third argument is "long", which is known to be able to
represent a pointer on the platforms that 4.x and earlier support.  In
5.x we just have ascii strings and no ioconf.c at all.

> 2) what purpose does SYSINIT serve?

They provide an ordered hook in the boot sequence.  You provide a function,
a data pointer, and where/when it is to be called.  The kernel will call
those functions at the appropriate time for you so that you can do
initialization etc.  It is done with linker magic. (see gensetdefs and
setdef*)

> thanks for your time,
> SJ

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


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




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