#ifndef _LOCK_FREE_QUEUE_H
#define _LOCK_FREE_QUEUE_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "log.h"

#define LOCK_FREE_QUEUE_LOG_ERROR(format, ...) LOG_ERROR("lock free queue", format, ##__VA_ARGS__)
#define LOCK_FREE_QUEUE_LOG_DEBUG(format, ...) LOG_DEBUG("lock free queue", format, ##__VA_ARGS__)

struct lock_free_queue;

struct lock_free_queue *lock_free_queue_new(uint32_t size);
void lock_free_queue_free(struct lock_free_queue *queue);
int lock_free_queue_empty(struct lock_free_queue *queue);

int lock_free_queue_push(struct lock_free_queue *queue, void *data);
void lock_free_queue_pop(struct lock_free_queue *queue, void **data);

#ifdef __cplusplus
}
#endif

#endif
