* Push several objects on 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 push on the stack from the obj_table. * @return * Actual number of objects pushed (either 0 or *n*). */
| 106 | * Actual number of objects pushed (either 0 or *n*). |
| 107 | */ |
| 108 | static __rte_always_inline unsigned int |
| 109 | rte_stack_push(struct rte_stack *s, void * const *obj_table, unsigned int n) |
| 110 | { |
| 111 | RTE_ASSERT(s != NULL); |
| 112 | RTE_ASSERT(obj_table != NULL); |
| 113 | |
| 114 | if (s->flags & RTE_STACK_F_LF) |
| 115 | return __rte_stack_lf_push(s, obj_table, n); |
| 116 | else |
| 117 | return __rte_stack_std_push(s, obj_table, n); |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Pop several objects from the stack (MT-safe). |