summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorGabriel Ravier <gabravier@gmail.com>2026-02-18 12:36:07 +0100
committerGitHub <noreply@github.com>2026-02-18 12:36:07 +0100
commit42242bdf882f238f6264882ee43bfb7f8b9076dd (patch)
tree96b4352a8d52b54335021c3e42a18a4cfd5a2c56 /src/code
parentb0a03cc1a4677a99ee6346a3c7f07b173df9d09e (diff)
Document sys_freeze.[ch] (#2666)
Diffstat (limited to 'src/code')
-rw-r--r--src/code/sys_freeze.c14
1 files changed, 13 insertions, 1 deletions
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);