Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Aug 1995 20:59:12 -0700 (MST)
From:      Terry Lambert <terry@Artisoft.com>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        davidg@Root.COM, terry@Artisoft.com, hackers@freefall.FreeBSD.org, julian@freefall.FreeBSD.org, terry@freefall.FreeBSD.org
Subject:   Re: Terry's changes..
Message-ID:  <199508290359.UAA15515@phaeton.artisoft.com>
In-Reply-To: <199508290231.MAA25986@godzilla.zeta.org.au> from "Bruce Evans" at Aug 29, 95 12:31:38 pm

next in thread | previous in thread | raw e-mail | index | archive | help

[ ... SYSINIT stuff ... ]

> Couldn't some of it have stayed as direct function calls?  It seems
> excessive to use an init function just to print the copyright (I
> had to introduce one because printf has the wrong type for an
> init function).

Yes and no.  The printf(), of which there is an example in the
init_main.c unless Julian has moved it already, is a bad exmaple,
since it wants to be in the initialization code for the module
bein initialized.  You add the module, you get the printf, you delete
the module, the printf goes away.

You can cast the fuction pointer if you are worried about warnings,
but the copyright stuff, I'd actually prefer as a seperate entity.

> I want to initialize clock interrupts earlier.  This requires moving at
> least part of initclocks() to machine-dependent code and initializing
> curproc = &proc0 later.  I don't want any non-determinism in the order
> for this.

That's what the holes are for.  The determinism in the order is dictated
by the enumeration value, not order.  The order field lets you initialize
subparts of the same driver; for other things, you just make sure they
occur in enumeration order.  An enumeration order change would require
a change to kernel.h -- in general, it's not critical enough for non
default systems that you need to add an enumeration entry.  You take an
existing entry + some to get an ordered set.

Just because you want to init a then b then c doesn't mean that
someone won't want to init q between your a and your b.  As long as
you don't depend on q and q doesn't depend on you, no problem.

Personally, I'd appreciate initializing the clocks as one of the first
things in the system at all, since I think timers in the device probe
code could greatly help concurrency.

					-- Terry



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