Remove global number_of_processors variable
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d2e5b808 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d2e5b808 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d2e5b808 Branch: refs/heads/master Commit: d2e5b8089b1741a173feee514e67278c1766bac3 Parents: eb1726d Author: James Peach <[email protected]> Authored: Tue Aug 20 11:48:54 2013 -0700 Committer: James Peach <[email protected]> Committed: Tue Aug 20 11:48:54 2013 -0700 ---------------------------------------------------------------------- proxy/Main.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d2e5b808/proxy/Main.cc ---------------------------------------------------------------------- diff --git a/proxy/Main.cc b/proxy/Main.cc index be52f0a..c80081c 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -120,8 +120,7 @@ static void * mgmt_restart_shutdown_callback(void *, char *, int data_len); static int version_flag = DEFAULT_VERSION_FLAG; -static int const number_of_processors = ink_number_of_processors(); -static int num_of_net_threads = number_of_processors; +static int num_of_net_threads = ink_number_of_processors(); static int num_of_udp_threads = 0; static int num_accept_threads = 0; static int num_task_threads = 0; @@ -1143,9 +1142,8 @@ getNumSSLThreads(void) } else { float autoconfig_scale = 1.5; - ink_assert(number_of_processors); TS_ReadConfigFloat(autoconfig_scale, "proxy.config.exec_thread.autoconfig.scale"); - num_of_ssl_threads = (int)((float)number_of_processors * autoconfig_scale); + num_of_ssl_threads = (int)((float)ink_number_of_processors() * autoconfig_scale); // Last resort if (num_of_ssl_threads <= 0)
