diff --git a/.gitignore b/.gitignore index 895a6eba..70daee0f 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ CMakeScripts Makefile Testing CTestTestfile.cmake +cmake-build* # gdb .gdb_history @@ -66,3 +67,4 @@ gdb_history *.swp src/config.h .ycm_extra_conf.py +.idea diff --git a/src/nexus_impl/nexus.cc b/src/nexus_impl/nexus.cc index 94b551a1..1e14424a 100644 --- a/src/nexus_impl/nexus.cc +++ b/src/nexus_impl/nexus.cc @@ -58,11 +58,11 @@ Nexus::Nexus(std::string local_uri, size_t numa_node, size_t num_bg_threads) sm_thread_ctx.reg_hooks_lock = ®_hooks_lock; // Bind the session management thread to the last lcore on numa_node - size_t sm_thread_lcore_index = num_lcores_per_numa_node() - 1; + auto lcores = get_lcores_for_numa_node(numa_node); ERPC_INFO("eRPC Nexus: Launching session management thread on core %zu.\n", - get_lcores_for_numa_node(numa_node).at(sm_thread_lcore_index)); + lcores.back()); sm_thread = std::thread(sm_thread_func, sm_thread_ctx); - bind_to_core(sm_thread, numa_node, sm_thread_lcore_index); + bind_to_core(sm_thread, numa_node, lcores.size() - 1); ERPC_INFO("eRPC Nexus: Created with management UDP port %u, hostname %s.\n", sm_udp_port, hostname.c_str());