Subject: Re: Detecting boot time
To: Lennart Augustsson <augustss@augustsson.net>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 09/15/1999 18:43:12
Lennart Augustsson wrote:

> Is there a way (in kernel code) to detect if the kernel is in
> the boot part or running normally?
> I want to know because during boot the interrups are disabled
> and you need to poll for completion, whereas during normal
> execution interrupts work.

From what I've seen in bits of the kernel, the following should do the
trick:

	extern int cold;

	if (cold) {
		/* at boot time.... */
	}

Simon.