27 lines
635 B
C
27 lines
635 B
C
|
|
#ifndef _LOCK_FREE_QUEUE_H
|
||
|
|
#define _LOCK_FREE_QUEUE_H
|
||
|
|
|
||
|
|
#ifdef __cpluscplus
|
||
|
|
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);
|
||
|
|
|
||
|
|
void lock_free_queue_push(struct lock_free_queue *queue, void *data);
|
||
|
|
void lock_free_queue_pop(struct lock_free_queue *queue, void **data);
|
||
|
|
|
||
|
|
#ifdef __cpluscplus
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif
|