diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-09 16:28:50 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-09 16:28:50 +0000 |
commit | db29066670d0ef0c4d0fbf658e7b3b7f02f94723 (patch) | |
tree | 09ad0e978e24aa66c115a2ee5a82af6b38ad4064 /include/asterisk | |
parent | 5a8a65e60a86ccfa230f831ff0f9a0837dc84993 (diff) |
Merged revisions 199743 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r199743 | dvossel | 2009-06-09 11:22:04 -0500 (Tue, 09 Jun 2009) | 11 lines
module load priority
This patch adds the option to give a module a load priority. The value represents the order in which a module's load() function is initialized. The lower the value, the higher the priority. The value is only checked if the AST_MODFLAG_LOAD_ORDER flag is set. If the AST_MODFLAG_LOAD_ORDER flag is not set, the value will never be read and the module will be given the lowest possible priority
on load. Since some modules are reliant on a timing interface, the timing modules have been given a high load priorty.
(closes issue #15191)
Reported by: alecdavis
Tested by: dvossel
Review: https://reviewboard.asterisk.org/r/262/
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@199744 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/module.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asterisk/module.h b/include/asterisk/module.h index c952db448..3445d2c9e 100644 --- a/include/asterisk/module.h +++ b/include/asterisk/module.h @@ -189,6 +189,7 @@ struct ast_module_user_list; enum ast_module_flags { AST_MODFLAG_DEFAULT = 0, AST_MODFLAG_GLOBAL_SYMBOLS = (1 << 0), + AST_MODFLAG_LOAD_ORDER = (1 << 1), }; struct ast_module_info { @@ -219,6 +220,13 @@ struct ast_module_info { /*! The value of AST_BUILDOPT_SUM when this module was compiled */ const char buildopt_sum[33]; + + /*! This value represents the order in which a module's load() function is initialized. + * The lower this value, the higher the priority. The value is only checked if the + * AST_MODFLAG_LOAD_ORDER flag is set. If the AST_MODFLAG_LOAD_ORDER flag is not set, + * this value will never be read and the module will be given the lowest possible priority + * on load. */ + unsigned char load_pri; }; void ast_module_register(const struct ast_module_info *); |