* Pop several objects from the stack (MT-safe). * * @param s * A pointer to the stack structure. * @param obj_table * A pointer to a table of void * pointers (objects). * @param n * The number of objects to pull from the stack. * @return * Actual number of objects popped (either 0 or *n*). */
| 130 | * Actual number of objects popped (either 0 or *n*). |
| 131 | */ |
| 132 | static __rte_always_inline unsigned int |
| 133 | rte_stack_pop(struct rte_stack *s, void **obj_table, unsigned int n) |
| 134 | { |
| 135 | RTE_ASSERT(s != NULL); |
| 136 | RTE_ASSERT(obj_table != NULL); |
| 137 | |
| 138 | if (s->flags & RTE_STACK_F_LF) |
| 139 | return __rte_stack_lf_pop(s, obj_table, n); |
| 140 | else |
| 141 | return __rte_stack_std_pop(s, obj_table, n); |
| 142 | } |
| 143 | |
| 144 | /** |
| 145 | * Return the number of used entries in a stack. |