12 stack->
top = stack_top;
13 stack->
head = stack_top;
26 mos_panic(
"stack overflow on stack %p, attempted to push %zu bytes", (
void *) stack,
size);
29 return (
void *) stack->
head;
36 mos_panic(
"stack overflow on stack %p, attempted to push %zu bytes", (
void *) stack,
size);
40 return (
void *) stack->
head;
47 mos_panic(
"stack underflow on stack %p, attempted to pop %zu bytes", (
void *) stack,
size);
void stack_deinit(downwards_stack_t *stack)
void stack_init(downwards_stack_t *stack, void *mem_region_bottom, size_t size)
void * stack_grow(downwards_stack_t *stack, size_t size)
void stack_pop(downwards_stack_t *stack, size_t size, void *data)
void * stack_push(downwards_stack_t *stack, const void *data, size_t size)
#define mos_panic(fmt,...)
static void * memcpy(void *s1, const void *s2, size_t n)
static void * memset(void *s, int c, size_t n)