summaryrefslogtreecommitdiff
path: root/src/kernel/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/main.c')
-rw-r--r--src/kernel/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/kernel/main.c b/src/kernel/main.c
index 19cc970..9188370 100644
--- a/src/kernel/main.c
+++ b/src/kernel/main.c
@@ -30,3 +30,14 @@ void kmain(struct kmain_info info) {
kprintf("loading init...\n");
run_init(&info);
}
+
+void shutdown(void) {
+ size_t states[PS_LAST] = {0};
+ for (struct process *p = process_first; p; p = process_next(p))
+ states[p->state]++;
+ for (size_t i = 0; i < sizeof(states) / sizeof(*states); i++)
+ kprintf("state 0x%x: 0x%x\n", i, states[i]);
+
+ mem_debugprint();
+ cpu_shutdown();
+}