diff --git a/kernel/src/services.rs b/kernel/src/services.rs index c61ec16e4..6eea76b6c 100644 --- a/kernel/src/services.rs +++ b/kernel/src/services.rs @@ -2178,7 +2178,7 @@ impl SystemServices { } Ok(()) } - + /* https://github.com/betrusted-io/xous-core/issues/90 /// Sets the exception handler for the given process ID. If an exception handler /// exists, it will be silently overridden. pub fn set_exception_handler( @@ -2194,6 +2194,7 @@ impl SystemServices { }; Ok(()) } + */ /// Causes the provided process to go into an exception state. This will fail /// if any of the following are true: diff --git a/kernel/src/syscall.rs b/kernel/src/syscall.rs index 3a8f3f991..fb42a3038 100644 --- a/kernel/src/syscall.rs +++ b/kernel/src/syscall.rs @@ -884,10 +884,12 @@ pub fn handle_inner(pid: PID, tid: TID, in_irq: bool, call: SysCall) -> SysCallR ret }) } + /* https://github.com/betrusted-io/xous-core/issues/90 SysCall::SetExceptionHandler(pc, sp) => SystemServices::with_mut(|ss| { ss.set_exception_handler(pid, pc, sp) .and(Ok(xous_kernel::Result::Ok)) }), + */ _ => Err(xous_kernel::Error::UnhandledSyscall), } } diff --git a/xous-rs/src/syscall.rs b/xous-rs/src/syscall.rs index 5650b29e6..0b80a3648 100644 --- a/xous-rs/src/syscall.rs +++ b/xous-rs/src/syscall.rs @@ -1,9 +1,12 @@ use crate::{ - pid_from_usize, CpuID, Error, Exception, MemoryAddress, MemoryFlags, MemoryMessage, + pid_from_usize, CpuID, Error, MemoryAddress, MemoryFlags, MemoryMessage, MemoryRange, MemorySize, MemoryType, Message, MessageEnvelope, MessageSender, ProcessArgs, ProcessInit, Result, ScalarMessage, SysCallResult, ThreadInit, CID, PID, SID, TID, }; use core::convert::{TryFrom, TryInto}; +/* https://github.com/betrusted-io/xous-core/issues/90 +use crate::Exception +*/ // use num_derive::FromPrimitive; // use num_traits::FromPrimitive; @@ -1627,7 +1630,7 @@ pub fn join_thread(tid: TID) -> core::result::Result { } }) } - +/* https://github.com/betrusted-io/xous-core/issues/90 static EXCEPTION_HANDLER: core::sync::atomic::AtomicUsize = core::sync::atomic::AtomicUsize::new(0); fn handle_exception(exception_type: usize, arg1: usize, arg2: usize) -> isize { let exception = crate::exceptions::Exception::new(exception_type, arg1, arg2); @@ -1635,7 +1638,6 @@ fn handle_exception(exception_type: usize, arg1: usize, arg2: usize) -> isize { let f = unsafe { core::mem::transmute:: isize>(f) }; f(exception) } - /// Sets the given function as this process' Exception handler. This function /// will be called whenever an Exception occurs such as a memory fault, /// illegal instruction, or a child process terminating. @@ -1663,6 +1665,7 @@ pub fn set_exception_handler( } }) } +*/ /// Perform a raw syscall and return the result. This will transform /// `xous::Result::Error(e)` into an `Err(e)`.