summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Process.cpp6
-rw-r--r--Kernel/Process.h1
-rw-r--r--Kernel/Syscall.cpp2
-rw-r--r--Kernel/Syscall.h3
4 files changed, 11 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index e40ff1cae2..1a0e5ecbb2 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -2716,3 +2716,9 @@ int Process::sys$dump_backtrace()
dump_backtrace();
return 0;
}
+
+int Process::sys$dbgputch(u8 ch)
+{
+ IO::out8(0xe9, ch);
+ return 0;
+}
diff --git a/Kernel/Process.h b/Kernel/Process.h
index 674b12f41f..eb603f9f77 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -104,6 +104,7 @@ public:
void die();
void finalize();
+ int sys$dbgputch(u8);
int sys$dump_backtrace();
int sys$gettid();
int sys$donate(int tid);
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp
index 0512874e7a..d547f62b8b 100644
--- a/Kernel/Syscall.cpp
+++ b/Kernel/Syscall.cpp
@@ -70,6 +70,8 @@ static u32 handle(RegisterDump& regs, u32 function, u32 arg1, u32 arg2, u32 arg3
case Syscall::SC_putch:
Console::the().put_char(arg1 & 0xff);
break;
+ case Syscall::SC_dbgputch:
+ return current->process().sys$dbgputch((u8)arg1);
case Syscall::SC_sleep:
return current->process().sys$sleep((unsigned)arg1);
case Syscall::SC_usleep:
diff --git a/Kernel/Syscall.h b/Kernel/Syscall.h
index a20997eb9c..40a585a959 100644
--- a/Kernel/Syscall.h
+++ b/Kernel/Syscall.h
@@ -116,7 +116,8 @@ struct timeval;
__ENUMERATE_SYSCALL(fchown) \
__ENUMERATE_SYSCALL(halt) \
__ENUMERATE_SYSCALL(reboot) \
- __ENUMERATE_SYSCALL(dump_backtrace)
+ __ENUMERATE_SYSCALL(dump_backtrace) \
+ __ENUMERATE_SYSCALL(dbgputch)
namespace Syscall {