more priority tweaks

This commit is contained in:
Anthony Minessale 2012-10-02 07:39:21 -05:00
parent 5620d6d063
commit bc06155740
2 changed files with 2 additions and 2 deletions

View File

@ -637,7 +637,7 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t **
if ((status = apr_threadattr_create(new_attr, pool)) == SWITCH_STATUS_SUCCESS) { if ((status = apr_threadattr_create(new_attr, pool)) == SWITCH_STATUS_SUCCESS) {
#ifndef WIN32 #ifndef WIN32
(*new_attr)->priority = SWITCH_PRI_NORMAL; (*new_attr)->priority = SWITCH_PRI_LOW;
#endif #endif
} }

View File

@ -735,7 +735,7 @@ SWITCH_DECLARE(int32_t) set_realtime_priority(void)
const char *rt = "/proc/sys/kernel/sched_rt_runtime_us"; const char *rt = "/proc/sys/kernel/sched_rt_runtime_us";
char data[] = "-1\n"; char data[] = "-1\n";
struct sched_param sched = { 0 }; struct sched_param sched = { 0 };
sched.sched_priority = SWITCH_PRI_REALTIME; sched.sched_priority = SWITCH_PRI_LOW;
if (sched_setscheduler(0, SCHED_RR, &sched)) { if (sched_setscheduler(0, SCHED_RR, &sched)) {
sched.sched_priority = 0; sched.sched_priority = 0;
if (sched_setscheduler(0, SCHED_OTHER, &sched)) { if (sched_setscheduler(0, SCHED_OTHER, &sched)) {