summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2026-02-05 01:22:56 -0300
committerGitHub <noreply@github.com>2026-02-04 20:22:56 -0800
commitd358e1d213c29c6e63be30c1c67b96a90f45ccc4 (patch)
tree64fe8ac8e1599aced05a7a78f3b556add97716fc /src
parent505f4b65c8361b5a8a8783a45b611d13c5ae0845 (diff)
[n64-jp-1.1] stackcheck.c matched (#1844)
* Match stackcheck * format * review
Diffstat (limited to 'src')
-rw-r--r--src/boot/libu64/stackcheck.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/boot/libu64/stackcheck.c b/src/boot/libu64/stackcheck.c
index 905495221..46a609fcb 100644
--- a/src/boot/libu64/stackcheck.c
+++ b/src/boot/libu64/stackcheck.c
@@ -2,6 +2,8 @@
#include "stdbool.h"
#include "stdint.h"
+#include "versions.h"
+
StackEntry* sStackInfoListStart = NULL;
StackEntry* sStackInfoListEnd = NULL;
@@ -17,12 +19,15 @@ void StackCheck_Init(StackEntry* entry, void* stackBottom, void* stackTop, u32 i
entry->initValue = initValue;
entry->minSpace = minSpace;
entry->name = name;
- iter = sStackInfoListStart;
- while (iter) {
+
+ for (iter = sStackInfoListStart; iter != NULL; iter = iter->next) {
if (iter == entry) {
+#if MM_VERSION < N64_US
+ // is already in the list
+ osSyncPrintf("stackcheck_init: %08x は既にリスト中にある\n", entry);
+#endif
return;
}
- iter = iter->next;
}
entry->prev = sStackInfoListEnd;
@@ -68,7 +73,12 @@ void StackCheck_Cleanup(StackEntry* entry) {
}
}
- if (inconsistency) {}
+ if (inconsistency) {
+#if MM_VERSION < N64_US
+ // List is inconsistent
+ osSyncPrintf("stackcheck_cleanup: %08x リスト不整合です\n", entry);
+#endif
+ }
}
StackStatus StackCheck_GetState(StackEntry* entry) {
@@ -94,7 +104,12 @@ StackStatus StackCheck_GetState(StackEntry* entry) {
status = STACK_STATUS_OK;
}
+#if MM_VERSION < N64_US
+ osSyncPrintf("head=%08x tail=%08x last=%08x used=%08x free=%08x [%s]\n", entry->head, entry->tail, last, used, free,
+ (entry->name != NULL) ? entry->name : "(null)");
+#else
(void)"(null)";
+#endif
return status;
}