#ifndef _RINGBUFFER_H_ #define _RINGBUFFER_H_ #include #include #define BUFFER_SIZE 256 typedef struct { void* buffer[BUFFER_SIZE+5]; uint32_t bufferReadIdx; uint32_t bufferWriteIdx; pthread_mutex_t eventMutex; pthread_cond_t eventSignal; } ringbuffer_t; void ringbufferInit(ringbuffer_t *handle); void ringbufferPut(ringbuffer_t *handle, void *f); void *ringbufferGet(ringbuffer_t *handle); #endif // _RINGBUFFER_H_