mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-11-15 21:55:06 -05:00
b22985712f
If the stack ever grows too large (and starts overwriting variables in .bss) the firmware jumps into the bootloader. This is better than just continuing to run with strange side effects.
17 lines
285 B
C
17 lines
285 B
C
#ifndef _stkchk_h__
|
|
#define _stkchk_h__
|
|
|
|
#undef STKCHK_WITH_STATUS_CHECK
|
|
|
|
#ifdef STKCHK_WITH_STATUS_CHECK
|
|
#define stkcheck() stkchk(__FUNCTION__);
|
|
void stkchk(const char *label);
|
|
#else
|
|
#define stkcheck()
|
|
#endif
|
|
|
|
void stkchk_init(void);
|
|
char stkchk_verify(void);
|
|
|
|
#endif // _stkchk_h__
|