Subject: Re: foo_init()s in main() [was: CVS commit: src/sys]
To: None <>
From: YAMAMOTO Takashi <>
List: tech-kern
Date: 11/23/2005 15:10:00
> > So, consider a network driver, which would call if_attach()...  
> > if_attach() would in turn call if_init(), which would in turn call  
> > if_init0() once.
> > 
> > For things like lists / tables / etc., we can change to using static  
> > initializers for those.
> > 
> It could be done by kernel linker(loader) so he'll be responsible for module loading
> and initialization, and so it wouldn't be needed to code dependiencies explicitly.
> -Andrey

initializations doesn't always belong to module loading.
esp. for statically linked modules.
it should be done when it's really necessary, IMO.