* Enqueue one object on a ring. * * This function calls the multi-producer or the single-producer * 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 * A pointer to the object to be added. * @return * - 0: Success; objects enqueued. * - -ENOBUFS: Not enough room in the
| 333 | * - -ENOBUFS: Not enough room in the ring to enqueue; no object is enqueued. |
| 334 | */ |
| 335 | static __rte_always_inline int |
| 336 | rte_ring_enqueue(struct rte_ring *r, void *obj) |
| 337 | { |
| 338 | return rte_ring_enqueue_elem(r, &obj, sizeof(void *)); |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Dequeue several objects from a ring (multi-consumers safe). |