From 6013640ad779b407fae7a070e65713860b0c0ff9 Mon Sep 17 00:00:00 2001 From: vandechat96 Date: Fri, 31 Mar 2023 15:45:45 +0200 Subject: [PATCH] test --- .gitmodules | 2 +- src/syscall/mod.rs | 10 ++++++++++ syscall | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index e49218a..752552e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "syscall"] path = syscall - url = https://gitlab.redox-os.org/redox-os/syscall.git + url = https://git.jika.li/jika/redox-syscall.git branch = master [submodule "slab_allocator"] path = slab_allocator diff --git a/src/syscall/mod.rs b/src/syscall/mod.rs index eb6cf36..5f18288 100644 --- a/src/syscall/mod.rs +++ b/src/syscall/mod.rs @@ -33,6 +33,7 @@ use self::flag::{MapFlags, PhysmapFlags, WaitFlags}; use self::number::*; use crate::context::ContextId; +use crate::interrupt::exception::{divide_by_zero, non_maskable}; use crate::interrupt::InterruptStack; use crate::scheme::{FileHandle, SchemeNamespace, memory::MemoryScheme}; @@ -60,6 +61,14 @@ pub mod time; /// Validate input pub mod validate; +fn nmi_t() -> Result{ + println!("Yo"); + unsafe { + //non_maskable(); + } + Ok(0) +} + /// This function is the syscall handler of the kernel, it is composed of an inner function that returns a `Result`. After the inner function runs, the syscall /// function calls [`Error::mux`] on it. pub fn syscall(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, stack: &mut InterruptStack) -> usize { @@ -99,6 +108,7 @@ pub fn syscall(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, stack }, _ => match a { SYS_YIELD => sched_yield(), + SYS_NMI => nmi_t(), SYS_NANOSLEEP => nanosleep( validate_slice(b as *const TimeSpec, 1).map(|req| &req[0])?, if c == 0 { diff --git a/syscall b/syscall index abf7e59..b4a5977 160000 --- a/syscall +++ b/syscall @@ -1 +1 @@ -Subproject commit abf7e59f5ad001a7a981d53751368c8fad189ffc +Subproject commit b4a597788bb1f18cd1413a1137a484d6ef74c741