MOS Source Code
Loading...
Searching...
No Matches
libs.DownStack

A stack that grows down. More...

+ Collaboration diagram for libs.DownStack:

Classes

struct  downwards_stack_t
 

Macros

#define stack_push_val(stack, val)
 
#define stack_pop_val(stack, val)
 

Functions

MOSAPI void stack_init (downwards_stack_t *stack, void *mem_region_bottom, size_t size)
 
MOSAPI void stack_deinit (downwards_stack_t *stack)
 
MOSAPI voidstack_grow (downwards_stack_t *stack, size_t size)
 
MOSAPI voidstack_push (downwards_stack_t *stack, const void *data, size_t size)
 
MOSAPI void stack_pop (downwards_stack_t *stack, size_t size, void *data)
 

Detailed Description

A stack that grows down.

Macro Definition Documentation

◆ stack_push_val

#define stack_push_val ( stack,
val )
Value:
do \
{ \
typeof(val) _val = (val); \
stack_push(stack, &_val, sizeof(_val)); \
} while (0)

Definition at line 26 of file stack.h.

Referenced by elf_setup_main_thread(), and platform_jump_to_signal_handler().

◆ stack_pop_val

#define stack_pop_val ( stack,
val )
Value:
do \
{ \
typeof(val) _val; \
stack_pop(stack, sizeof(_val), &_val); \
(val) = _val; \
} while (0)

Definition at line 35 of file stack.h.

Referenced by platform_restore_from_signal_handler().

Function Documentation

◆ stack_init()

◆ stack_deinit()

MOSAPI void stack_deinit ( downwards_stack_t * stack)

Definition at line 17 of file stack.c.

Referenced by __mos_test_wrapped_test_stack_init_deinit(), and __mos_test_wrapped_test_stack_push_pop_stack().

+ Here is the call graph for this function:

◆ stack_grow()

MOSAPI void * stack_grow ( downwards_stack_t * stack,
size_t size )

Definition at line 22 of file stack.c.

◆ stack_push()

MOSAPI void * stack_push ( downwards_stack_t * stack,
const void * data,
size_t size )

Definition at line 32 of file stack.c.

Referenced by __mos_test_wrapped_test_stack_push_pop_stack(), and elf_setup_main_thread().

+ Here is the call graph for this function:

◆ stack_pop()

MOSAPI void stack_pop ( downwards_stack_t * stack,
size_t size,
void * data )

Definition at line 43 of file stack.c.

Referenced by __mos_test_wrapped_test_stack_push_pop_stack().

+ Here is the call graph for this function: