[asterisk-dev] [Code Review] IAX timer not loading

Russell Bryant russell at digium.com
Tue Jun 2 13:24:10 CDT 2009


Kevin P. Fleming wrote:
> Module initialization is another issue; without explicit dependencies
> declared in modules, the loader cannot do things in the 'right' order.
> I'll propose another alternative: let's follow the module most Linux
> /etc/init.d startup processes use, and assign an (optional) 'init order'
> value to modules. Then, the loader would load them all without actually
> calling load_module() in any of them (in two phases, 'preload' and
> 'normal', just like now), and then call load_module() in each module in
> order based on these 'order' values.
> 
> This would allow us to make res_timing_* modules have a *very* early
> 'init order' value, with all other modules default to a very late init
> order. It would also be explicit in the module definition, and not based
> on unrelated information (the module filename).

This sounds like a great approach to me.  However, it will require
breaking module ABI in an existing release (1.6.1), which is unfortunate.

Hm ... what if we added a new module flag, AST_MODFLAG_LOAD_ORDER, that
specifies that the module is providing a requested load order
identifier.  Also, the load order field could be put at the end of the
ast_module_info struct.  That way, we wouldn't try to access it unless
we knew it was there.

So, with that said, I think it's a great idea if we do something like
this that is ABI safe.  :-)

-- 
Russell Bryant
Digium, Inc. | Senior Software Engineer, Open Source Team Lead
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list