changeset 312:cd9092628a63

mv kernel_error KernelError.h
author anatofuz
date Thu, 06 Feb 2020 16:43:26 +0900
parents 356e7f4c70a2
children 561eedeb9a99
files src/CMakeLists.txt src/impl/KernelError.h src/impl/kernel_error.cbc src/impl/kernel_error.h
diffstat 4 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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
--- /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 <Type, Isa> impl ErrorGear {
+  __code infinity_loop(Type* error_gear,__code next(...));
+} KernelError;
--- 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;
 
--- 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 <Type, Isa> impl ErrorGear {
-  __code infinity_loop(Type* error_gear,__code next(...));
-} KernelError;