Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Aug 1996 14:49:25 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        julian@whistle.com (Julian Elischer)
Cc:        hackers@freebsd.org, julian@whistle.com
Subject:   Re: Rebooting and related topics..
Message-ID:  <199608132149.OAA27819@phaeton.artisoft.com>
In-Reply-To: <320FF06B.15FB7483@whistle.com> from "Julian Elischer" at Aug 12, 96 08:03:07 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.



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