cleard and moved includes to header
This commit is contained in:
@ -1,14 +1,3 @@
|
|||||||
#include <stdint.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#ifdef RINGBUFFER_THREAD_SAFE
|
|
||||||
#include <pthread.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "ringbuffer.h"
|
|
||||||
|
|
||||||
void _ringBufferIncReader(struct ringBuffer *buf) {
|
void _ringBufferIncReader(struct ringBuffer *buf) {
|
||||||
buf->reader += buf->blockSize;
|
buf->reader += buf->blockSize;
|
||||||
if (buf->reader >= buf->buffer + buf->blocks * buf->blockSize) {
|
if (buf->reader >= buf->buffer + buf->blocks * buf->blockSize) {
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#ifdef RINGBUFFER_THREAD_SAFE
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
struct ringBuffer {
|
struct ringBuffer {
|
||||||
void *buffer;
|
void *buffer;
|
||||||
|
Reference in New Issue
Block a user