git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hotfix: a better hinting on non-returning spin function
[lunaix-os.git]
/
lunaix-os
/
kernel
/
spike.c
diff --git
a/lunaix-os/kernel/spike.c
b/lunaix-os/kernel/spike.c
index 860b201d8f2b6542b0990f34f0500a3478e64812..cb1bc1f2777dc485bf4f46ee680c5dc45d2e4061 100644
(file)
--- a/
lunaix-os/kernel/spike.c
+++ b/
lunaix-os/kernel/spike.c
@@
-1,10
+1,10
@@
-#include <arch/x86/interrupts.h>
#include <klibc/stdio.h>
#include <lunaix/spike.h>
#include <klibc/stdio.h>
#include <lunaix/spike.h>
+#include <sys/interrupts.h>
static char buffer[1024];
static char buffer[1024];
-void
+void
noret
__assert_fail(const char* expr, const char* file, unsigned int line)
{
ksprintf(buffer, "%s (%s:%u)", expr, file, line);
__assert_fail(const char* expr, const char* file, unsigned int line)
{
ksprintf(buffer, "%s (%s:%u)", expr, file, line);
@@
-13,15
+13,15
@@
__assert_fail(const char* expr, const char* file, unsigned int line)
// This is a convention we made that the LUNAIX_SYS_PANIC syscall will
// print the panic message passed via %edi. (see
// kernel/asm/x86/interrupts.c)
// This is a convention we made that the LUNAIX_SYS_PANIC syscall will
// print the panic message passed via %edi. (see
// kernel/asm/x86/interrupts.c)
-
asm("int %0" ::"i"(LUNAIX_SYS_PANIC), "D"(buffer)
);
+
cpu_trap_panic(buffer
);
spin(); // never reach
}
spin(); // never reach
}
-void
+void
noret
panick(const char* msg)
{
panick(const char* msg)
{
-
asm("int %0" ::"i"(LUNAIX_SYS_PANIC), "D"(msg)
);
+
cpu_trap_panic(msg
);
spin();
}
spin();
}