aboutsummaryrefslogtreecommitdiffstats
path: root/kernel-rs/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'kernel-rs/src/lib.rs')
-rw-r--r--kernel-rs/src/lib.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel-rs/src/lib.rs b/kernel-rs/src/lib.rs
new file mode 100644
index 0000000..7893919
--- /dev/null
+++ b/kernel-rs/src/lib.rs
@@ -0,0 +1,17 @@
+#![no_std]
+
+#[panic_handler]
+fn panic(_info: &core::panic::PanicInfo) -> ! {
+ loop {}
+}
+
+#[no_mangle]
+pub unsafe extern "C" fn syscall_handler() {
+ printf("c suger lmao xd %d\n".as_ptr(), 69);
+ thread_exit();
+}
+
+extern {
+ fn thread_exit();
+ fn printf(format: *const u8, ...);
+}