From af100db4697a85522893ebbffbf2de2741988265 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期一, 20 七月 2020 11:13:41 +0800 Subject: [PATCH] update --- test/test.h | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/test/test.h b/test/test.h index 76aa358..25a3215 100644 --- a/test/test.h +++ b/test/test.h @@ -1,11 +1,11 @@ #include "usg_common.h" #include "usg_typedef.h" -#include "lock_free_queue.h" -#include "SLinkedLockFreeQueue.h" -#include "queue_factory.h" - #include <pthread.h> - -#define NTHREADS 3 +#include "shm_queue.h" +#include "shm_allocator.h" +#include <sstream> +//#include "queue_factory.h" +#include <pthread.h> +#include "mm.h" struct Item { @@ -14,6 +14,9 @@ }; + +// typedef shmstring item_t; +typedef int item_t; struct Targ { int key; int start; @@ -21,12 +24,14 @@ }; // 閿�姣佸叡浜唴瀛樺拰淇″彿 -void destroy() { +void destroy(int key) { - LockFreeQueue<struct Item> *queue = QueueFactory::createQueue<struct Item> (1, 16); - //queue->~LockFreeQueue(); - delete queue; - mm_deinit(); + // LockFreeQueue<struct Item> *queue = QueueFactory::createQueue<struct Item> (1, 16); + // //queue->~LockFreeQueue(); + // delete queue; + + //QueueFactory::dropQueue<struct Item>(key); + // mm_destroy(); } -- Gitblit v1.8.0