From owner-freebsd-hackers Thu May 24 10:26:52 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id E831537B422 for ; Thu, 24 May 2001 10:26:49 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f4OHQnM93014 for ; Thu, 24 May 2001 10:26:49 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 721AE380C; Thu, 24 May 2001 10:26:49 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: SJ Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: two general questions In-Reply-To: <20010524161944.85795.qmail@web13408.mail.yahoo.com> Date: Thu, 24 May 2001 10:26:49 -0700 From: Peter Wemm Message-Id: <20010524172649.721AE380C@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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