aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/context_switching/syscall_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/src/context_switching/syscall_handler.cpp')
-rw-r--r--arch/x86_64/src/context_switching/syscall_handler.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86_64/src/context_switching/syscall_handler.cpp b/arch/x86_64/src/context_switching/syscall_handler.cpp
new file mode 100644
index 0000000..1bc4ef9
--- /dev/null
+++ b/arch/x86_64/src/context_switching/syscall_handler.cpp
@@ -0,0 +1,20 @@
+#include "arch/context_switching/syscall_handler.hpp"
+
+#include <cstdint>
+
+namespace teachos::arch::context_switching
+{
+ [[gnu::naked]]
+ auto syscall_handler() -> void
+ {
+ uint64_t dummy{};
+ switch (dummy)
+ {
+ case 0:
+ break;
+ default:
+ break;
+ }
+ asm volatile("SYSRET");
+ }
+} // namespace teachos::arch::context_switching \ No newline at end of file