blob: df0d01921aeee0f39ed57e77b35ab795abfd3949 [file] [log] [blame]
Song Zhaoc03ba122020-12-23 21:54:02 -08001/*
bo.xiao00387eb2023-02-24 18:44:29 +08002 * Copyright (C) 2021 Amlogic Corporation.
Song Zhaoc03ba122020-12-23 21:54:02 -08003 *
bo.xiao00387eb2023-02-24 18:44:29 +08004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Song Zhaoc03ba122020-12-23 21:54:02 -080015 *
16 * Description: fifo implementation
17 * Author: song.zhao@amlogic.com
18 */
19
20#ifndef _AML_QUEUE_H_
21#define _AML_QUEUE_H_
22
23#include <stdint.h>
24
25void* create_q(int max_len);
26void destroy_q(void * queue);
27int queue_item(void *queue, void * item);
28/* cnt 0 for frist one in fifo, cnt 1 for 2nd one in fifo, etc */
29int peek_item(void *queue, void** p_item, uint32_t cnt);
30int dqueue_item(void *queue, void** p_item);
31int queue_size(void *queue);
32
33#endif