Subject: Re: dynamic configuration (was Re: PR#4094)
To: Chris G. Demetriou <cgd@sibyte.com>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-kern
Date: 08/11/2000 00:05:52
On Thu, Aug 10, 2000 at 01:43:43PM -0700, Chris G. Demetriou wrote:
> You really have two choices about how to do the initalization of such
> a list:
> 
> * do it automatically, perhaps using a list collected by config or a
> linker feature.
> 
> * do it manually as part of an init function in every module that
> might want such a thing.
> 
> You certainly could do the latter, but it's inarguably more
> error-prone and fragile than doing it automatically, once you have the
> basic list aggregation mechanism in place and functional.

More error prone? Why? In fact, I think it's a lot better. I do NOT
want to have a kernel in which initialization is done in an order
unknown to me, and be at the mercy of the toolchain. I prefer
to do this in a controlled fashion. Not to mention that it makes
debugging harder.

That's exactly why using global constructors in C++ can be a disaster,
you never know what has been initialized and what not.

- Frank