From owner-freebsd-hackers Tue Aug 13 14:55:11 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA14737 for hackers-outgoing; Tue, 13 Aug 1996 14:55:11 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA14730 for ; Tue, 13 Aug 1996 14:55:06 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA27819; Tue, 13 Aug 1996 14:49:25 -0700 From: Terry Lambert Message-Id: <199608132149.OAA27819@phaeton.artisoft.com> Subject: Re: Rebooting and related topics.. To: julian@whistle.com (Julian Elischer) Date: Tue, 13 Aug 1996 14:49:25 -0700 (MST) Cc: hackers@freebsd.org, julian@whistle.com In-Reply-To: <320FF06B.15FB7483@whistle.com> from "Julian Elischer" at Aug 12, 96 08:03:07 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I've added a small callout list to the reboot code so that we and > other third party types can add modules which require actions at > shutdown. looking at the boot code however, I see that about 90% > of boot() in machdep.c is in fact NOT mach dependent at all. > I'd like to move most of this out to somewhere more generic > while I'm adding my callout code.. > > several questions.. > > 1/ am I correct? I think so. > 2/ can anyone suggest the correct place for it? kern_sync.c? kern_shutdown.c? (new) > 3/ The callout code has a prototype for the function at_reboot() > where should this prototype live? (I've dropped it into > systm.h at the moment) > > the reason for a kerenl based callout list > rather than a user-based rc.shutdown is to do with the nature > of the modules being added here.. > > I'd eventually like to add similar callout lists to exit() and fork() > but they are not needed for these particular modules. Think about priority based insertion and maintaining a front/end/middle (middle = don't care) insertion order. That way the actual attempts at keyboard reset, etc., can be put into the same list as call-outs. You may also want to add a parameter to the calldowns that supports the type of shutdown (halt/reboot/boot_to_dos, etc.). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.