5 #ifndef _RTE_STACK_STD_H_
6 #define _RTE_STACK_STD_H_
23 __rte_stack_std_push(
struct rte_stack *s,
void *
const *obj_table,
26 struct rte_stack_std *stack = &s->stack_std;
31 cache_objs = &stack->objs[stack->len];
34 if ((stack->len + n) > s->capacity) {
40 for (index = 0; index < n; ++index, obj_table++)
41 cache_objs[index] = *obj_table;
62 __rte_stack_std_pop(
struct rte_stack *s,
void **obj_table,
unsigned int n)
64 struct rte_stack_std *stack = &s->stack_std;
65 unsigned int index, len;
75 cache_objs = stack->objs;
77 for (index = 0, len = stack->len - 1; index < n;
78 ++index, len--, obj_table++)
79 *obj_table = cache_objs[len];
96 __rte_stack_std_count(
struct rte_stack *s)
98 return (
unsigned int)s->stack_std.len;
108 rte_stack_std_init(
struct rte_stack *s);
119 rte_stack_std_get_memsize(
unsigned int count);