From 42242bdf882f238f6264882ee43bfb7f8b9076dd Mon Sep 17 00:00:00 2001 From: Gabriel Ravier Date: Wed, 18 Feb 2026 12:36:07 +0100 Subject: Document sys_freeze.[ch] (#2666) --- src/code/sys_freeze.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/code') diff --git a/src/code/sys_freeze.c b/src/code/sys_freeze.c index 295715555..e4e1dccd9 100644 --- a/src/code/sys_freeze.c +++ b/src/code/sys_freeze.c @@ -4,7 +4,19 @@ #include "sys_freeze.h" #include "terminal.h" -NORETURN void func_800D31A0(void) { +/** + * Halts the calling thread forever (this neither destroys it nor affects other threads). + * This may be used to halt execution in the event of an irrecoverable error without triggering + * the crash screen or otherwise halting the rest of the programs, other threads will continue + * to run as normal. + * + * @note In practice, use of this function is very rare, only occuring in a few N64DD-related + * codepaths. In most cases where one needs to halt execution due to a critical error, + * it is more appropriate to use Fault_AddHangupAndCrash or related functions. + * + * @see Fault_AddHungupAndCrash + */ +NORETURN void Freeze_CurrentThread(void) { PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST); for (;;) { Sleep_Msec(1000); -- cgit v1.2.3