* Test if a ring is empty. * * @param r * A pointer to the ring structure. * @return * - 1: The ring is empty. * - 0: The ring is not empty. */
| 546 | * - 0: The ring is not empty. |
| 547 | */ |
| 548 | static inline int |
| 549 | rte_ring_empty(const struct rte_ring *r) |
| 550 | { |
| 551 | uint32_t prod_tail = r->prod.tail; |
| 552 | uint32_t cons_tail = r->cons.tail; |
| 553 | return cons_tail == prod_tail; |
| 554 | } |
| 555 | |
| 556 | /** |
| 557 | * Return the size of the ring. |
no outgoing calls