Blog
Community
Development
Documentation
CNDP
22.08.0
mempool_ring.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright (c) 2019-2022 Intel Corporation
3
*/
4
5
#ifndef _MEMPOOL_RING_H_
6
#define _MEMPOOL_RING_H_
7
14
#include <stddef.h>
// for size_t
15
#include <stdint.h>
// for uint32_t
16
#include <sys/types.h>
// for ssize_t
17
18
#include "
mempool.h
"
// for cne_mempool
19
#include "
mempool_private.h
"
// for cne_mempool
20
21
// IWYU pragma: no_forward_declare cne_mempool
22
33
typedef
void(
mempool_populate_obj_cb_t
)(
struct
cne_mempool *mp,
void
*opaque,
void
*vaddr);
34
35
int
mempool_ring_enqueue(
struct
cne_mempool *mp,
void
*
const
*obj_table,
unsigned
n);
36
37
int
mempool_ring_dequeue(
struct
cne_mempool *mp,
void
**obj_table,
unsigned
n);
38
39
unsigned
mempool_ring_get_count(
const
struct
cne_mempool *mp);
40
41
int
mempool_ring_alloc(
struct
cne_mempool *mp);
42
43
void
mempool_ring_free(
struct
cne_mempool *mp);
44
45
ssize_t mempool_ring_calc_mem_size(
const
struct
cne_mempool *mp, uint32_t obj_num,
46
uint32_t pg_shift,
size_t
*min_chunk_size,
size_t
*align);
47
int
mempool_ring_populate(
struct
cne_mempool *mp,
void
*vaddr,
mempool_populate_obj_cb_t
*obj_cb,
48
void
*obj_cb_arg);
49
50
#endif
/* _MEMPOOL_RING_H_ */
mempool.h
mempool_private.h
mempool_populate_obj_cb_t
void() mempool_populate_obj_cb_t(struct cne_mempool *mp, void *opaque, void *vaddr)
Definition:
mempool_ring.h:33
lib
core
mempool
mempool_ring.h
Generated by
1.9.1