1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
3 * Copyright(c) 2019 Arm Limited
10 #include <rte_memzone.h>
11 #include <rte_rwlock.h>
12 #include <rte_eal_memconfig.h>
13 #include "rte_event_ring.h"
16 rte_event_ring_init(struct rte_event_ring *r, const char *name,
17 unsigned int count, unsigned int flags)
19 /* compilation-time checks */
20 RTE_BUILD_BUG_ON((sizeof(struct rte_event_ring) &
21 RTE_CACHE_LINE_MASK) != 0);
23 /* init the ring structure */
24 return rte_ring_init(&r->r, name, count, flags);
28 struct rte_event_ring *
29 rte_event_ring_create(const char *name, unsigned int count, int socket_id,
32 return (struct rte_event_ring *)rte_ring_create_elem(name,
33 sizeof(struct rte_event),
34 count, socket_id, flags);
38 struct rte_event_ring *
39 rte_event_ring_lookup(const char *name)
41 return (struct rte_event_ring *)rte_ring_lookup(name);
46 rte_event_ring_free(struct rte_event_ring *r)
48 rte_ring_free((struct rte_ring *)r);