1/** 2 * Copyright (c) 2010-2012 Broadcom. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions, and the following disclaimer, --- 30 unchanged lines hidden (view full) --- 39#endif 40 41#include "vchiq_if.h" 42 43typedef struct { 44 int size; 45 int read; 46 int write; |
47 int initialized; |
48 49 struct semaphore pop; 50 struct semaphore push; 51 52 VCHIQ_HEADER_T **storage; 53} VCHIU_QUEUE_T; 54 55extern int vchiu_queue_init(VCHIU_QUEUE_T *queue, int size); 56extern void vchiu_queue_delete(VCHIU_QUEUE_T *queue); 57 58extern int vchiu_queue_is_empty(VCHIU_QUEUE_T *queue); 59extern int vchiu_queue_is_full(VCHIU_QUEUE_T *queue); 60 61extern void vchiu_queue_push(VCHIU_QUEUE_T *queue, VCHIQ_HEADER_T *header); 62 63extern VCHIQ_HEADER_T *vchiu_queue_peek(VCHIU_QUEUE_T *queue); 64extern VCHIQ_HEADER_T *vchiu_queue_pop(VCHIU_QUEUE_T *queue); 65 66#endif |