* Dequeue one object from a ring (multi-consumers safe). * * This function uses a "compare and set" instruction to move the * consumer index atomically. * * @param r * A pointer to the ring structure. * @param obj_p * A pointer to a void * pointer (object) that will be filled. * @return * - 0: Success; objects dequeued. * - -ENOENT: Not enough entries in the ring to dequeue; no
| 431 | * dequeued. |
| 432 | */ |
| 433 | static __rte_always_inline int |
| 434 | rte_ring_mc_dequeue(struct rte_ring *r, void **obj_p) |
| 435 | { |
| 436 | return rte_ring_mc_dequeue_elem(r, obj_p, sizeof(void *)); |
| 437 | } |
| 438 | |
| 439 | /** |
| 440 | * Dequeue one object from a ring (NOT multi-consumers safe). |