5 #ifndef _RTE_STACK_STD_H_
6 #define _RTE_STACK_STD_H_
24 __rte_stack_std_push(
struct rte_stack *s,
void *
const *obj_table,
27 struct rte_stack_std *stack = &s->stack_std;
32 cache_objs = &stack->objs[stack->len];
35 if ((stack->len + n) > s->capacity) {
41 for (index = 0; index < n; ++index, obj_table++)
42 cache_objs[index] = *obj_table;
64 __rte_stack_std_pop(
struct rte_stack *s,
void **obj_table,
unsigned int n)
66 struct rte_stack_std *stack = &s->stack_std;
67 unsigned int index, len;
77 cache_objs = stack->objs;
79 for (index = 0, len = stack->len - 1; index < n;
80 ++index, len--, obj_table++)
81 *obj_table = cache_objs[len];
99 __rte_stack_std_count(
struct rte_stack *s)
101 return (
unsigned int)s->stack_std.len;
111 rte_stack_std_init(
struct rte_stack *s);
122 rte_stack_std_get_memsize(
unsigned int count);
#define __rte_always_inline
static void rte_spinlock_lock(rte_spinlock_t *sl)
static void rte_spinlock_unlock(rte_spinlock_t *sl)