From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 17 09:10:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 451441065676 for ; Thu, 17 Jul 2008 09:10:01 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id CB6F08FC13 for ; Thu, 17 Jul 2008 09:10:00 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=k3p6oJmvu9X0K6jyJCoA:9 a=hh3F76V-iU_lNBvvaP8A:7 a=UNhsl1084hu-gAv3dABm9_A2PZcA:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [193.217.167.134] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.4b) with ESMTPA id 1015852537; Thu, 17 Jul 2008 10:09:57 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Thu, 17 Jul 2008 10:11:34 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807171011.35988.hselasky@c2i.net> Cc: Jacky Oh Subject: Re: SYSINIT X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 09:10:01 -0000 On Wednesday 16 July 2008, Jacky Oh wrote: > Hello, > > I'm insvestigating about KLD's programming, and I cant find in my way wiht > the SYSINIT framework. My problem is that im from spanish, and the SYSINIT > concept is more complex for my as I understand in english. My question is, > anyone can explain to in a less complex form? please, I would be very > grateful, thankzz!! > > I belive that is a kernel trap for link modules and sub-systems, but i > don't sure. The best documentation about it is the charpter 5 of "FreeBSD > Architechture Handbook" Is the best doc but i need a small help..I'm > writing a KLD programming article for a spanish underground magazine. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" Hi, Simply put. The sysinit macro expands to a static structure using the "section" attribute which means the data ends up in a separate section after linking. Then the data in the sysinit section is scanned, sorted and executed at boot time or when you load a module. Sysuninit works in a similar way. --HPS