summaryrefslogtreecommitdiff
path: root/res/res_timing_pthread.c
diff options
context:
space:
mode:
authorDavid Vossel <dvossel@digium.com>2009-06-09 16:22:04 +0000
committerDavid Vossel <dvossel@digium.com>2009-06-09 16:22:04 +0000
commitd532cbcd8aaeef681e2e856e5f6e8ddc7c9f819a (patch)
tree977456b473f32698ff9021a10c7f811501922037 /res/res_timing_pthread.c
parentf3534a5a67b698a76f438eb00a56d331ca4238bd (diff)
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: https://origsvn.digium.com/svn/asterisk/trunk@199743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_timing_pthread.c')
-rw-r--r--res/res_timing_pthread.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/res/res_timing_pthread.c b/res/res_timing_pthread.c
index 86ae1bb42..53ceeb5de 100644
--- a/res/res_timing_pthread.c
+++ b/res/res_timing_pthread.c
@@ -521,5 +521,8 @@ static int unload_module(void)
return res;
}
-
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "pthread Timing Interface");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "pthread Timing Interface",
+ .load = load_module,
+ .unload = unload_module,
+ .load_pri = 10,
+ );