Add stack_check_collision() function
This commit is contained in:
parent
8df0a6c774
commit
b9a38549dc
@ -29,6 +29,18 @@ int32_t stack_check_get_usage();
|
||||
|
||||
int32_t stack_check_get_free();
|
||||
|
||||
static inline int stack_check_collision()
|
||||
{
|
||||
int ret = 0;
|
||||
int32_t free_space = stack_check_get_free();
|
||||
|
||||
if ((unsigned int)free_space < STACK_CHECK_MIN_HEAP_GAP) {
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline uint32_t read_stack_pointer()
|
||||
{
|
||||
uint32_t stack_pointer;
|
||||
|
Loading…
Reference in New Issue
Block a user