]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FSCORE-298
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 16 Feb 2009 13:59:13 +0000 (13:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 16 Feb 2009 13:59:13 +0000 (13:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12046 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_core.h
src/switch_loadable_module.c

index 3fa7dc955cf5bd8e52f4e7709d8f4b24845da98f..082f483c9871154ee9cb6db59daade435b1be844 100644 (file)
@@ -1669,7 +1669,7 @@ SWITCH_DECLARE(FILE *) switch_core_get_console(void);
 /*! 
   \brief Launch a thread
 */
-SWITCH_DECLARE(void) switch_core_launch_thread(void *(*func) (switch_thread_t *, void *), void *obj, switch_memory_pool_t *pool);
+SWITCH_DECLARE(void) switch_core_launch_thread(void *(SWITCH_THREAD_FUNC *func) (switch_thread_t *, void *), void *obj, switch_memory_pool_t *pool);
 
 /*!
   \brief Initiate Globals
index 506e27fb53a5ca8968044fcdc8bb0be25afc073a..db0e56bf9949efef755018f7e62495b7b41aab2e 100644 (file)
@@ -77,7 +77,7 @@ static struct switch_loadable_module_container loadable_modules;
 static switch_status_t do_shutdown(switch_loadable_module_t *module, switch_bool_t shutdown, switch_bool_t unload, switch_bool_t fail_if_busy, const char **err);
 static switch_status_t switch_loadable_module_load_module_ex(char *dir, char *fname, switch_bool_t runtime, switch_bool_t global, const char **err);
 
-static void *switch_loadable_module_exec(switch_thread_t *thread, void *obj)
+static void *SWITCH_THREAD_FUNC switch_loadable_module_exec(switch_thread_t *thread, void *obj)
 {
 
 
@@ -99,7 +99,7 @@ static void *switch_loadable_module_exec(switch_thread_t *thread, void *obj)
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroying Pool for %s\n", module->module_interface->module_name);
                switch_core_destroy_memory_pool(&pool);
        }
-       switch_yield(1000000);
+       switch_thread_exit(thread, 0);
        return NULL;
 }