/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* Copyright (c) 2010-2012 Broadcom. All rights reserved. */ #ifndef VCHIQ_UTIL_H #define VCHIQ_UTIL_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* for time_t */ #include #include "vchiq_if.h" struct vchiu_queue { int size; int read; int write; int initialized; struct completion pop; struct completion push; struct vchiq_header **storage; }; extern int vchiu_queue_init(struct vchiu_queue *queue, int size); extern void vchiu_queue_delete(struct vchiu_queue *queue); extern int vchiu_queue_is_empty(struct vchiu_queue *queue); extern int vchiu_queue_is_full(struct vchiu_queue *queue); extern void vchiu_queue_push(struct vchiu_queue *queue, struct vchiq_header *header); extern struct vchiq_header *vchiu_queue_peek(struct vchiu_queue *queue); extern struct vchiq_header *vchiu_queue_pop(struct vchiu_queue *queue); #endif