if (flags & SCF_MINIMAL) return SWITCH_STATUS_SUCCESS;
- runtime.tipping_point = 5000;
+ runtime.tipping_point = 0;
runtime.timer_affinity = -1;
switch_load_core_config("switch.conf");
SWITCH_DECLARE(void) switch_cond_next(void)
{
- if (globals.timer_count >= runtime.tipping_point) {
+ if (runtime.tipping_point && globals.timer_count >= runtime.tipping_point) {
os_yield();
return;
}
switch_mutex_lock(globals.mutex);
globals.timer_count++;
- if (globals.timer_count == (runtime.tipping_point + 1)) {
+ if (runtime.tipping_point && globals.timer_count == (runtime.tipping_point + 1)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Crossed tipping point of %u, shifting into high-gear.\n", runtime.tipping_point);
}
switch_mutex_unlock(globals.mutex);
while (globals.RUNNING == 1 && private_info->ready && TIMER_MATRIX[timer->interval].tick < private_info->reference) {
check_roll();
- if (globals.timer_count >= runtime.tipping_point) {
+ if (runtime.tipping_point && globals.timer_count >= runtime.tipping_point) {
os_yield();
globals.use_cond_yield = 0;
} else {
switch_mutex_lock(globals.mutex);
if (globals.timer_count) {
globals.timer_count--;
- if (globals.timer_count == (runtime.tipping_point - 1)) {
+ if (runtime.tipping_point && globals.timer_count == (runtime.tipping_point - 1)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Fell Below tipping point of %u, shifting into low-gear.\n", runtime.tipping_point);
}
}
rev_errs = 0;
}
- if (globals.timer_count >= runtime.tipping_point) {
+ if (runtime.tipping_point && globals.timer_count >= runtime.tipping_point) {
os_yield();
} else {
if (tfd > -1 && globals.RUNNING == 1) {