add .gitignore, first changes of ringbuffer
This commit is contained in:
17
ringbuffer.h
17
ringbuffer.h
@ -2,8 +2,21 @@
|
||||
#define _RINGBUFFER_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
|
||||
void ringbufferPut(uint32_t f);
|
||||
uint32_t ringbufferGet();
|
||||
|
||||
#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;
|
||||
} t_ringbuffer;
|
||||
|
||||
void ringbufferInit(t_ringbuffer *handle);
|
||||
void ringbufferPut(t_ringbuffer *handle, void *f);
|
||||
void *ringbufferGet(t_ringbuffer *handle);
|
||||
|
||||
#endif // _RINGBUFFER_H_
|
Reference in New Issue
Block a user