TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / wsutil / wmem / wmem_queue.h
blob49cd3e39a57ea14d9fced0fe9f4c0adf4ac51828
1 /** @file
3 * Definitions for the Wireshark Memory Manager Queue
4 * Copyright 2013, Evan Huus <eapache@gmail.com>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #ifndef __WMEM_QUEUE_H__
14 #define __WMEM_QUEUE_H__
16 #include <string.h>
17 #include <glib.h>
19 #include "wmem_core.h"
20 #include "wmem_list.h"
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* __cplusplus */
26 /** @addtogroup wmem
27 * @{
28 * @defgroup wmem-queue Queue
30 * A queue implementation on top of wmem.
32 * @{
35 /* Wmem queue is implemented as a dumb wrapper over Wmem list and stack */
36 typedef wmem_list_t wmem_queue_t;
38 #define wmem_queue_count(X) wmem_list_count(X)
40 #define wmem_queue_peek(QUEUE) wmem_stack_peek(QUEUE)
42 #define wmem_queue_pop(QUEUE) wmem_stack_pop(QUEUE)
44 #define wmem_queue_push(QUEUE, DATA) wmem_list_append((QUEUE), (DATA))
46 #define wmem_queue_new(ALLOCATOR) wmem_list_new(ALLOCATOR)
48 #define wmem_destroy_queue(QUEUE) wmem_destroy_list(QUEUE)
50 /** @}
51 * @} */
53 #ifdef __cplusplus
55 #endif /* __cplusplus */
57 #endif /* __WMEM_QUEUE_H__ */
60 * Editor modelines - https://www.wireshark.org/tools/modelines.html
62 * Local variables:
63 * c-basic-offset: 4
64 * tab-width: 8
65 * indent-tabs-mode: nil
66 * End:
68 * vi: set shiftwidth=4 tabstop=8 expandtab:
69 * :indentSize=4:tabSize=8:noTabs=true: