1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
3 * Copyright(c) 2019 Arm Limited
7 #include "rte_event_ring.h"
10 rte_event_ring_init(struct rte_event_ring *r, const char *name,
11 unsigned int count, unsigned int flags)
13 /* compilation-time checks */
14 RTE_BUILD_BUG_ON((sizeof(struct rte_event_ring) &
15 RTE_CACHE_LINE_MASK) != 0);
17 /* init the ring structure */
18 return rte_ring_init(&r->r, name, count, flags);
22 struct rte_event_ring *
23 rte_event_ring_create(const char *name, unsigned int count, int socket_id,
26 return (struct rte_event_ring *)rte_ring_create_elem(name,
27 sizeof(struct rte_event),
28 count, socket_id, flags);
32 struct rte_event_ring *
33 rte_event_ring_lookup(const char *name)
35 return (struct rte_event_ring *)rte_ring_lookup(name);
40 rte_event_ring_free(struct rte_event_ring *r)
42 rte_ring_free((struct rte_ring *)r);