# HG changeset patch # User anatofuz # Date 1580975006 -32400 # Node ID cd9092628a633b46db7c3756e083ab488684f54c # Parent 356e7f4c70a2fc46e1f26b521439cdbe6077882d mv kernel_error KernelError.h diff -r 356e7f4c70a2 -r cd9092628a63 src/CMakeLists.txt --- a/src/CMakeLists.txt Thu Feb 06 16:04:16 2020 +0900 +++ b/src/CMakeLists.txt Thu Feb 06 16:43:26 2020 +0900 @@ -128,7 +128,7 @@ SOURCES string.c arm.c asm.S bio.c buddy.c console.cbc exec.c file.cbc fs.c log.c main.c memide.c pipe.cbc proc.cbc spinlock.cbc start.c swtch.S syscall.cbc sysfile.cbc sysproc.c trap_asm.S trap.c vm.c device/picirq.c device/timer.c device/uart.c - SingleLinkedStack.cbc entry.S impl/vm_impl.cbc impl/vm_impl_private.cbc + SingleLinkedStack.cbc entry.S impl/vm_impl.cbc impl/vm_impl_private.cbc impl/kernel_error.cbc ) # sys_read_impl.cbc diff -r 356e7f4c70a2 -r cd9092628a63 src/impl/KernelError.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/impl/KernelError.h Thu Feb 06 16:43:26 2020 +0900 @@ -0,0 +1,3 @@ +typedef struct KernelError impl ErrorGear { + __code infinity_loop(Type* error_gear,__code next(...)); +} KernelError; diff -r 356e7f4c70a2 -r cd9092628a63 src/impl/kernel_error.cbc --- a/src/impl/kernel_error.cbc Thu Feb 06 16:04:16 2020 +0900 +++ b/src/impl/kernel_error.cbc Thu Feb 06 16:43:26 2020 +0900 @@ -1,4 +1,5 @@ -#include "../context.h" +#include "param.h" +#include "proc.h" #interface "ErrorGear.h" // ---- @@ -15,7 +16,6 @@ kernel_error->infinity_loop = C_infinity_loopKernelError; error_gear->error = C_errorKernelError; error_gear->panic = C_panicKernelError; - error_gear->next = C_nextKernelError; return error_gear; } @@ -29,6 +29,7 @@ } __code panicKernelError(struct KernelError* error_gear, char* msg) { + extern struct cpu* cpu; cli(); cons.locking = 0; diff -r 356e7f4c70a2 -r cd9092628a63 src/impl/kernel_error.h --- a/src/impl/kernel_error.h Thu Feb 06 16:04:16 2020 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -typedef struct KernelError impl ErrorGear { - __code infinity_loop(Type* error_gear,__code next(...)); -} KernelError;