test
This commit is contained in:
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
2
syscall
2
syscall
Submodule syscall updated: abf7e59f5a...b4a597788b
Reference in New Issue
Block a user