Lines Matching defs:retstack
34 void pt_retstack_init(struct pt_retstack *retstack)
36 if (!retstack)
39 retstack->top = 0;
40 retstack->bottom = 0;
43 int pt_retstack_is_empty(const struct pt_retstack *retstack)
45 if (!retstack)
48 return (retstack->top == retstack->bottom ? 1 : 0);
51 int pt_retstack_pop(struct pt_retstack *retstack, uint64_t *ip)
55 if (!retstack)
58 top = retstack->top;
60 if (top == retstack->bottom)
65 retstack->top = top;
68 *ip = retstack->stack[top];
73 int pt_retstack_push(struct pt_retstack *retstack, uint64_t ip)
77 if (!retstack)
80 top = retstack->top;
81 bottom = retstack->bottom;
83 retstack->stack[top] = ip;
90 retstack->top = top;
91 retstack->bottom = bottom;