blob: 1ded643cf4770c09364974c9c50ce6a3f5436125 [file] [log] [blame]
Song Zhao6859d412020-06-15 17:16:04 -07001/*
2 * Copyright (c) 2020 Amlogic, Inc. All rights reserved.
3 *
4 * This source code is subject to the terms and conditions defined in the
5 * file 'LICENSE' which is part of this source code package.
6 *
7 * Description: fifo implementation
8 * Author: song.zhao@amlogic.com
9 */
10
11#ifndef _AML_QUEUE_H_
12#define _AML_QUEUE_H_
13
14#include <stdint.h>
15
16void* create_q(int max_len);
17void destroy_q(void * queue);
18int queue_item(void *queue, void * item);
19/* cnt 0 for frist one in fifo, cnt 1 for 2nd one in fifo, etc */
20int peek_item(void *queue, void** p_item, uint32_t cnt);
21int dqueue_item(void *queue, void** p_item);
22int queue_size(void *queue);
23
24#endif