skypopen: let's bump the thread priorities (to be refined, thanks Tony)

This commit is contained in:
Giovanni Maruzzelli 2011-05-05 12:32:25 -05:00
parent 7c971707b1
commit 6341694d13
1 changed files with 4 additions and 0 deletions

View File

@ -1733,6 +1733,7 @@ static switch_status_t load_config(int reload_type)
switch_threadattr_create(&skypopen_api_thread_attr, skypopen_module_pool); switch_threadattr_create(&skypopen_api_thread_attr, skypopen_module_pool);
switch_threadattr_detach_set(skypopen_api_thread_attr, 0); switch_threadattr_detach_set(skypopen_api_thread_attr, 0);
switch_threadattr_stacksize_set(skypopen_api_thread_attr, SWITCH_THREAD_STACKSIZE); switch_threadattr_stacksize_set(skypopen_api_thread_attr, SWITCH_THREAD_STACKSIZE);
switch_threadattr_priority_increase(skypopen_api_thread_attr);
switch_thread_create(&globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread, switch_thread_create(&globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread,
skypopen_api_thread_attr, skypopen_do_skypeapi_thread, &globals.SKYPOPEN_INTERFACES[interface_id], skypopen_api_thread_attr, skypopen_do_skypeapi_thread, &globals.SKYPOPEN_INTERFACES[interface_id],
skypopen_module_pool); skypopen_module_pool);
@ -1742,6 +1743,7 @@ static switch_status_t load_config(int reload_type)
switch_threadattr_create(&skypopen_signaling_thread_attr, skypopen_module_pool); switch_threadattr_create(&skypopen_signaling_thread_attr, skypopen_module_pool);
switch_threadattr_detach_set(skypopen_signaling_thread_attr, 0); switch_threadattr_detach_set(skypopen_signaling_thread_attr, 0);
switch_threadattr_stacksize_set(skypopen_signaling_thread_attr, SWITCH_THREAD_STACKSIZE); switch_threadattr_stacksize_set(skypopen_signaling_thread_attr, SWITCH_THREAD_STACKSIZE);
switch_threadattr_priority_increase(skypopen_signaling_thread_attr);
switch_thread_create(&globals.SKYPOPEN_INTERFACES[interface_id]. switch_thread_create(&globals.SKYPOPEN_INTERFACES[interface_id].
skypopen_signaling_thread, skypopen_signaling_thread_attr, skypopen_signaling_thread, skypopen_signaling_thread_attr,
skypopen_signaling_thread_func, &globals.SKYPOPEN_INTERFACES[interface_id], skypopen_module_pool); skypopen_signaling_thread_func, &globals.SKYPOPEN_INTERFACES[interface_id], skypopen_module_pool);
@ -2197,6 +2199,7 @@ int start_audio_threads(private_t *tech_pvt)
switch_threadattr_create(&thd_attr, skypopen_module_pool); switch_threadattr_create(&thd_attr, skypopen_module_pool);
switch_threadattr_detach_set(thd_attr, 0); switch_threadattr_detach_set(thd_attr, 0);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE); switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_threadattr_priority_increase(thd_attr);
switch_mutex_lock(tech_pvt->mutex_thread_audio_srv); switch_mutex_lock(tech_pvt->mutex_thread_audio_srv);
//DEBUGA_SKYPE("debugging_hangup srv lock\n", SKYPOPEN_P_LOG); //DEBUGA_SKYPE("debugging_hangup srv lock\n", SKYPOPEN_P_LOG);
if (switch_thread_create(&tech_pvt->tcp_srv_thread, thd_attr, skypopen_do_tcp_srv_thread, tech_pvt, skypopen_module_pool) == SWITCH_STATUS_SUCCESS) { if (switch_thread_create(&tech_pvt->tcp_srv_thread, thd_attr, skypopen_do_tcp_srv_thread, tech_pvt, skypopen_module_pool) == SWITCH_STATUS_SUCCESS) {
@ -2213,6 +2216,7 @@ int start_audio_threads(private_t *tech_pvt)
switch_threadattr_create(&thd_attr, skypopen_module_pool); switch_threadattr_create(&thd_attr, skypopen_module_pool);
switch_threadattr_detach_set(thd_attr, 0); switch_threadattr_detach_set(thd_attr, 0);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE); switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_threadattr_priority_increase(thd_attr);
switch_mutex_lock(tech_pvt->mutex_thread_audio_cli); switch_mutex_lock(tech_pvt->mutex_thread_audio_cli);
//DEBUGA_SKYPE("debugging_hangup cli lock\n", SKYPOPEN_P_LOG); //DEBUGA_SKYPE("debugging_hangup cli lock\n", SKYPOPEN_P_LOG);
if (switch_thread_create(&tech_pvt->tcp_cli_thread, thd_attr, skypopen_do_tcp_cli_thread, tech_pvt, skypopen_module_pool) == SWITCH_STATUS_SUCCESS) { if (switch_thread_create(&tech_pvt->tcp_cli_thread, thd_attr, skypopen_do_tcp_cli_thread, tech_pvt, skypopen_module_pool) == SWITCH_STATUS_SUCCESS) {