HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / wmem / wmem_queue.h
blobc79489402c647f043547e0f1dbabf29d685a0ee3
1 /* wmem_queue.h
2 * Definitions for the Wireshark Memory Manager Queue
3 * Copyright 2013, Evan Huus <eapache@gmail.com>
5 * $Id$
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #ifndef __WMEM_QUEUE_H__
27 #define __WMEM_QUEUE_H__
29 #include <string.h>
30 #include <glib.h>
32 #include "wmem_core.h"
33 #include "wmem_list.h"
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
39 /** @addtogroup wmem
40 * @{
41 * @defgroup wmem-stack Queue
43 * A queue implementation on top of wmem.
45 * @{
48 /* Wmem queue is implemented as a dumb wrapper over Wmem list and stack */
49 typedef wmem_list_t wmem_queue_t;
51 #define wmem_queue_count(X) wmem_list_count(X)
53 #define wmem_queue_peek(QUEUE) wmem_stack_peek(QUEUE)
55 #define wmem_queue_pop(QUEUE) wmem_stack_pop(QUEUE)
57 #define wmem_queue_push(QUEUE, DATA) wmem_list_append((QUEUE), (DATA))
59 #define wmem_queue_new(ALLOCATOR) wmem_list_new(ALLOCATOR)
61 /** @}
62 * @} */
64 #ifdef __cplusplus
66 #endif /* __cplusplus */
68 #endif /* __WMEM_QUEUE_H__ */
71 * Editor modelines - http://www.wireshark.org/tools/modelines.html
73 * Local variables:
74 * c-basic-offset: 4
75 * tab-width: 8
76 * indent-tabs-mode: nil
77 * End:
79 * vi: set shiftwidth=4 tabstop=8 expandtab:
80 * :indentSize=4:tabSize=8:noTabs=true: