2 * Espressif Systems Wireless LAN device driver
4 * Copyright (C) 2015-2021 Espressif Systems (Shanghai) PTE LTD
6 * This software file (the "File") is distributed by Espressif Systems (Shanghai)
7 * PTE LTD under the terms of the GNU General Public License Version 2, June 1991
8 * (the "License"). You may use, redistribute and/or modify this File in
9 * accordance with the terms and conditions of the License, a copy of which
10 * is available by writing to the Free Software Foundation, Inc.,
11 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
12 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
14 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
16 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
17 * this warranty disclaimer.
19 #ifndef __ESP_QUEUE_H__
20 #define __ESP_QUEUE_H__
22 #define ESP_QUEUE_SUCCESS 0
23 #define ESP_QUEUE_ERR_UNINITALISED -1
24 #define ESP_QUEUE_ERR_MEMORY -2
26 typedef struct q_element {
31 /* Queue based on Linked List */
32 typedef struct esp_queue_node {
34 struct esp_queue_node* next;
37 typedef struct esp_queue {
38 q_node_t *front, *rear;
41 esp_queue_t* create_esp_queue(void);
42 void *esp_queue_get(esp_queue_t* q);
43 int esp_queue_put(esp_queue_t* q, void *data);
44 void esp_queue_destroy(esp_queue_t** q);
46 #endif /*__ESP_QUEUE_H__*/