summaryrefslogtreecommitdiff
path: root/Source/Kernel/Core/Sys.ns.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/Core/Sys.ns.h')
-rw-r--r--Source/Kernel/Core/Sys.ns.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Kernel/Core/Sys.ns.h b/Source/Kernel/Core/Sys.ns.h
index 825b68c..a205892 100644
--- a/Source/Kernel/Core/Sys.ns.h
+++ b/Source/Kernel/Core/Sys.ns.h
@@ -4,14 +4,28 @@
#ifndef DEF_SYS_NS_H
#define DEF_SYS_NS_H
+#define PANIC(msg) Sys::panic(msg, __FILE__, __LINE__)
+#define PANIC_DUMP(msg, regs) Sys::panic(msg, regs, __FILE__, __LINE__)
+#define ASSERT(b) ((b) ? (void)0 : Sys::panic_assert(__FILE__, __LINE__, #b))
+
+#ifdef OPT_DEBUG
+#define DEBUG(m) Sys::bochs_output(m, __FILE__, __LINE__)
+#define DEBUG_HEX(m) Sys::bochs_output_hex(m);
+#else
+#define DEBUG(m)
+#define DEBUG_HEX(m)
+#endif
+
//This file contains system-relative functions
class String;
+struct registers_t;
namespace Sys {
void outb(u16int port, u8int value);
u8int inb(u16int port);
u16int inw(u16int port);
void panic(char* message, char *file, u32int line);
+ void panic(char* message, registers_t *regs, char *file, u32int line);
void panic_assert(char* file, u32int line, char *desc);
void bochs_output(char* message, char *file, u32int line);
void bochs_output(String message, char *file, u32int line);