#ifndef _LINUX_PTR_RING_H
#define _LINUX_PTR_RING_H …
#ifdef __KERNEL__
#include <linux/spinlock.h>
#include <linux/cache.h>
#include <linux/types.h>
#include <linux/compiler.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <asm/errno.h>
#endif
struct ptr_ring { … };
static inline bool __ptr_ring_full(struct ptr_ring *r)
{ … }
static inline bool ptr_ring_full(struct ptr_ring *r)
{ … }
static inline bool ptr_ring_full_irq(struct ptr_ring *r)
{ … }
static inline bool ptr_ring_full_any(struct ptr_ring *r)
{ … }
static inline bool ptr_ring_full_bh(struct ptr_ring *r)
{ … }
static inline int __ptr_ring_produce(struct ptr_ring *r, void *ptr)
{ … }
static inline int ptr_ring_produce(struct ptr_ring *r, void *ptr)
{ … }
static inline int ptr_ring_produce_irq(struct ptr_ring *r, void *ptr)
{ … }
static inline int ptr_ring_produce_any(struct ptr_ring *r, void *ptr)
{ … }
static inline int ptr_ring_produce_bh(struct ptr_ring *r, void *ptr)
{ … }
static inline void *__ptr_ring_peek(struct ptr_ring *r)
{ … }
static inline bool __ptr_ring_empty(struct ptr_ring *r)
{ … }
static inline bool ptr_ring_empty(struct ptr_ring *r)
{ … }
static inline bool ptr_ring_empty_irq(struct ptr_ring *r)
{ … }
static inline bool ptr_ring_empty_any(struct ptr_ring *r)
{ … }
static inline bool ptr_ring_empty_bh(struct ptr_ring *r)
{ … }
static inline void __ptr_ring_discard_one(struct ptr_ring *r)
{ … }
static inline void *__ptr_ring_consume(struct ptr_ring *r)
{ … }
static inline int __ptr_ring_consume_batched(struct ptr_ring *r,
void **array, int n)
{ … }
static inline void *ptr_ring_consume(struct ptr_ring *r)
{ … }
static inline void *ptr_ring_consume_irq(struct ptr_ring *r)
{ … }
static inline void *ptr_ring_consume_any(struct ptr_ring *r)
{ … }
static inline void *ptr_ring_consume_bh(struct ptr_ring *r)
{ … }
static inline int ptr_ring_consume_batched(struct ptr_ring *r,
void **array, int n)
{ … }
static inline int ptr_ring_consume_batched_irq(struct ptr_ring *r,
void **array, int n)
{ … }
static inline int ptr_ring_consume_batched_any(struct ptr_ring *r,
void **array, int n)
{ … }
static inline int ptr_ring_consume_batched_bh(struct ptr_ring *r,
void **array, int n)
{ … }
#define __PTR_RING_PEEK_CALL(r, f) …
#define PTR_RING_PEEK_CALL(r, f) …
#define PTR_RING_PEEK_CALL_IRQ(r, f) …
#define PTR_RING_PEEK_CALL_BH(r, f) …
#define PTR_RING_PEEK_CALL_ANY(r, f) …
static inline void **__ptr_ring_init_queue_alloc_noprof(unsigned int size, gfp_t gfp)
{ … }
static inline void __ptr_ring_set_size(struct ptr_ring *r, int size)
{ … }
static inline int ptr_ring_init_noprof(struct ptr_ring *r, int size, gfp_t gfp)
{ … }
#define ptr_ring_init(...) …
static inline void ptr_ring_unconsume(struct ptr_ring *r, void **batch, int n,
void (*destroy)(void *))
{ … }
static inline void **__ptr_ring_swap_queue(struct ptr_ring *r, void **queue,
int size, gfp_t gfp,
void (*destroy)(void *))
{ … }
static inline int ptr_ring_resize_noprof(struct ptr_ring *r, int size, gfp_t gfp,
void (*destroy)(void *))
{ … }
#define ptr_ring_resize(...) …
static inline int ptr_ring_resize_multiple_noprof(struct ptr_ring **rings,
unsigned int nrings,
int size,
gfp_t gfp, void (*destroy)(void *))
{ … }
#define ptr_ring_resize_multiple(...) …
static inline void ptr_ring_cleanup(struct ptr_ring *r, void (*destroy)(void *))
{ … }
#endif