This commit is contained in:
vandechat96
2023-03-31 15:45:45 +02:00
parent 42de1f3e9c
commit 6013640ad7
3 changed files with 12 additions and 2 deletions

2
.gitmodules vendored
View File

@@ -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

View File

@@ -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<usize>{
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<usize>`. 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 {

Submodule syscall updated: abf7e59f5a...b4a597788b