1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| #include "usg_common.h"
| #include "usg_typedef.h"
| #include "shm_queue.h"
| #include "shm_queue_wrapper.h"
| #include "shm_allocator.h"
| #include <sstream>
| //#include "queue_factory.h"
| #include <pthread.h>
| #include "mm.h"
|
| struct Item
| {
| int pic;
| int info;
|
| };
|
|
| // typedef shmstring item_t;
| typedef int item_t;
| struct Targ {
| int key;
| int start;
| int end;
| };
|
| // 销毁共享内存和信号
| void destroy(int key) {
|
| // LockFreeQueue<struct Item> *queue = QueueFactory::createQueue<struct Item> (1, 16);
| // //queue->~LockFreeQueue();
| // delete queue;
|
| //QueueFactory::dropQueue<struct Item>(key);
| // mm_destroy();
|
|
| }
|
|