From 3788226ee9332945e90066b58f2b85026c2a0460 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期二, 18 五月 2021 10:56:32 +0800 Subject: [PATCH] change node init, no shm lock any more. --- src/defs.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/defs.h b/src/defs.h index cc3dc02..6939352 100644 --- a/src/defs.h +++ b/src/defs.h @@ -19,6 +19,7 @@ #ifndef DEFS_KP8LKGD0 #define DEFS_KP8LKGD0 +#include "robust.h" #include <atomic> #include <string> @@ -35,8 +36,8 @@ struct CenterInfo { MQInfo mq_center_; MQInfo mq_bus_; - MQInfo mq_init_; MQInfo mq_sender_; + robust::AtomicReqRep init_rr_; std::atomic<MQId> mqid_; CenterInfo() : mqid_(100000) {} @@ -62,6 +63,7 @@ const MQInfo &BHGlobalSenderAddress(); const MQInfo &BHTopicCenterAddress(); const MQInfo &BHTopicBusAddress(); -const MQInfo &BHCenterReplyAddress(); +bool BHNodeInit(const int64_t request, int64_t &reply); +void BHCenterHandleInit(std::function<int64_t(const int64_t)> const &onReq); #endif // end of include guard: DEFS_KP8LKGD0 -- Gitblit v1.8.0