From 1b167ec5ad101ac44451381e26cc73ab5d67d2a1 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期一, 26 四月 2021 16:37:52 +0800 Subject: [PATCH] fix socket busy loop; del locked readall; refactor. --- src/defs.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/defs.cpp b/src/defs.cpp index 0ca82bf..cc6f23b 100644 --- a/src/defs.cpp +++ b/src/defs.cpp @@ -17,7 +17,7 @@ */ #include "defs.h" #include "msg.h" -#include "shm_queue.h" +#include "shm_msg_queue.h" namespace { @@ -35,9 +35,13 @@ } // namespace +std::string BHomeShmName() +{ + return "bhome_default_shm_v0"; +} bhome_shm::SharedMemory &BHomeShm() { - static bhome_shm::SharedMemory shm("bhome_default_shm_v0", 1024 * 1024 * 512); + static bhome_shm::SharedMemory shm(BHomeShmName(), 1024 * 1024 * 512); return shm; } -- Gitblit v1.8.0