* Dequeue one object from a ring. * * This function calls the multi-consumers or the single-consumer * version depending on the default behaviour that was specified at * ring creation time (see flags). * * @param r * A pointer to the ring structure. * @param obj_p * A pointer to the object that will be filled. * @param esize * The size of ring element, in bytes. It must be a multi
| 470 | * dequeued. |
| 471 | */ |
| 472 | static __rte_always_inline int |
| 473 | rte_ring_dequeue_elem(struct rte_ring *r, void *obj_p, unsigned int esize) |
| 474 | { |
| 475 | return rte_ring_dequeue_bulk_elem(r, obj_p, esize, 1, NULL) ? 0 : |
| 476 | -ENOENT; |
| 477 | } |
| 478 | |
| 479 | /** |
| 480 | * Enqueue several objects on the ring (multi-producers safe). |