From e169b50d548bc23021bea6f8971e3094e6bc216b Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期五, 10 七月 2020 15:43:14 +0800
Subject: [PATCH] update

---
 queue/include/shm_queue.h |    2 +-
 queue/mm.c                |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/queue/include/shm_queue.h b/queue/include/shm_queue.h
index 1ccd873..16e0d66 100644
--- a/queue/include/shm_queue.h
+++ b/queue/include/shm_queue.h
@@ -82,7 +82,7 @@
 {
     queue->reference--;
     LoggerFactory::getLogger().debug("SHMQueue destructor  reference===%d", queue->reference.load());
-    if(queue->reference == 0) {
+    if(queue->reference.load() == 0) {
         delete queue;
         hashtable_t *hashtable = getHashTable();
         hashtable_remove(hashtable, KEY);
diff --git a/queue/mm.c b/queue/mm.c
index 293ed93..dc325e2 100644
--- a/queue/mm.c
+++ b/queue/mm.c
@@ -74,9 +74,8 @@
 static void *mem_sbrk(int incr);
 static int is_allocated(void *ptr);
 
-
-static  int shmid = -1;
-static  void *shmp;
+static int shmid = -1;
+static void *shmp;
 static int mutex = SemUtil::get(SHM_MUTEX_KEY, 1);
 //static int mutex = SemUtil::get(IPC_PRIVATE, 1);
 

--
Gitblit v1.8.0