]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make valgrind not complain about these threads
authorMichael Jerris <mike@jerris.com>
Wed, 15 Oct 2008 23:13:36 +0000 (23:13 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 15 Oct 2008 23:13:36 +0000 (23:13 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10040 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_event.c
src/switch_log.c

index 7de730e232d8fa7c5b10e72195b5df498f2dae33..2a36cd1e348c40ca2760c5eb598dbc6a7406089f 100644 (file)
@@ -490,6 +490,7 @@ static void launch_dispatch_threads(uint32_t max, int len, switch_memory_pool_t
                switch_threadattr_create(&thd_attr, pool);
                switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
                switch_threadattr_priority_increase(thd_attr);
+               switch_threadattr_detach_set(thd_attr, 1);
                switch_thread_create(&thread, thd_attr, switch_event_dispatch_thread, EVENT_DISPATCH_QUEUE[index], pool);
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Create event dispatch thread %d\n", index);
        }
@@ -527,6 +528,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool)
        switch_core_hash_init(&CUSTOM_HASH, RUNTIME_POOL);
        switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
        switch_threadattr_priority_increase(thd_attr);
+       switch_threadattr_detach_set(thd_attr, 1);
 
        launch_dispatch_threads(1, DISPATCH_QUEUE_LEN, RUNTIME_POOL);
        switch_thread_create(&thread, thd_attr, switch_event_thread, EVENT_QUEUE[0], RUNTIME_POOL);
index bbfd1f21a1b298f60de31ca47c7f98f468a0c1a3..cb39b4c0e4e550f866c0338cbf63c25ce21e1e85 100644 (file)
@@ -398,6 +398,7 @@ SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool, swit
        switch_queue_create(&LOG_RECYCLE_QUEUE, SWITCH_CORE_QUEUE_LEN, LOG_POOL);
        switch_mutex_init(&BINDLOCK, SWITCH_MUTEX_NESTED, LOG_POOL);
        switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
+       switch_threadattr_detach_set(thd_attr, 1);
        switch_thread_create(&thread, thd_attr, log_thread, NULL, LOG_POOL);
 
        while (!THREAD_RUNNING) {