From ca319178f45ce6256aed7913565d445571f6db22 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期二, 20 四月 2021 11:04:07 +0800
Subject: [PATCH] add go api, wrap C api, not finished.

---
 src/defs.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/defs.cpp b/src/defs.cpp
index 77b0722..0ff671b 100644
--- a/src/defs.cpp
+++ b/src/defs.cpp
@@ -16,6 +16,8 @@
  * =====================================================================================
  */
 #include "defs.h"
+#include "shm.h"
+
 namespace
 {
 
@@ -40,6 +42,12 @@
 const MQId &BHTopicCenterAddress() { return kBHTopicCenter; }
 const MQId &BHUniCenterAddress() { return kBHUniCenter; }
 
+bhome_shm::SharedMemory &BHomeShm()
+{
+	static bhome_shm::SharedMemory shm("bhome_default_shm_v0", 1024 * 1024 * 512);
+	return shm;
+}
+
 void SetLastError(const int ec, const std::string &msg)
 {
 	LastErrorStore().ec_ = ec;

--
Gitblit v1.8.0