* Return the number of free entries in a stack. * * @param s * A pointer to the stack structure. * @return * The number of free entries in the stack. */
| 169 | * The number of free entries in the stack. |
| 170 | */ |
| 171 | static __rte_always_inline unsigned int |
| 172 | rte_stack_free_count(struct rte_stack *s) |
| 173 | { |
| 174 | RTE_ASSERT(s != NULL); |
| 175 | |
| 176 | return s->capacity - rte_stack_count(s); |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * Create a new stack named *name* in memory. |