MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_ring_mp_enqueue

Function rte_ring_mp_enqueue

dpdk/lib/ring/rte_ring.h:297–301  ·  view source on GitHub ↗

* Enqueue one object on a ring (multi-producers safe). * * This function uses a "compare and set" instruction to move the * producer index atomically. * * @param r * A pointer to the ring structure. * @param obj * A pointer to the object to be added. * @return * - 0: Success; objects enqueued. * - -ENOBUFS: Not enough room in the ring to enqueue; no object is enqueued. */

Source from the content-addressed store, hash-verified

295 * - -ENOBUFS: Not enough room in the ring to enqueue; no object is enqueued.
296 */
297static __rte_always_inline int
298rte_ring_mp_enqueue(struct rte_ring *r, void *obj)
299{
300 return rte_ring_mp_enqueue_elem(r, &obj, sizeof(void *));
301}
302
303/**
304 * Enqueue one object on a ring (NOT multi-producers safe).

Callers 1

test_ring_enqueueFunction · 0.85

Calls 1

rte_ring_mp_enqueue_elemFunction · 0.85

Tested by 1

test_ring_enqueueFunction · 0.68