Make graphical_debug arch independent and fix lots of warnings
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use crate::interrupt::InterruptStack;
|
||||
use crate::memory::{allocate_frames_complex, deallocate_frames, Frame, PAGE_SIZE};
|
||||
use crate::paging::{Page, PageFlags, PhysicalAddress, VirtualAddress, mapper::PageFlushAll};
|
||||
use crate::paging::{PageFlags, PhysicalAddress, VirtualAddress, mapper::PageFlushAll};
|
||||
use crate::paging::entry::EntryFlags;
|
||||
use crate::context;
|
||||
use crate::context::memory::{DANGLING, Grant, Region};
|
||||
use crate::context::memory::{Grant, Region};
|
||||
use crate::syscall::error::{Error, EFAULT, EINVAL, ENOMEM, EPERM, ESRCH, Result};
|
||||
use crate::syscall::flag::{PhysallocFlags, PartialAllocStrategy, PhysmapFlags, PHYSMAP_WRITE, PHYSMAP_WRITE_COMBINE, PHYSMAP_NO_CACHE};
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ pub fn futexes_mut() -> RwLockWriteGuard<'static, FutexList> {
|
||||
pub fn futex(addr: usize, op: usize, val: usize, val2: usize, addr2: usize) -> Result<usize> {
|
||||
let addr_space = Arc::clone(context::current()?.read().addr_space()?);
|
||||
|
||||
let (target_physaddr, _) = unsafe {
|
||||
let (target_physaddr, _) = {
|
||||
let virtual_address = VirtualAddress::new(addr);
|
||||
|
||||
if !crate::CurrentRmmArch::virt_is_valid(virtual_address) {
|
||||
|
||||
+4
-4
@@ -28,7 +28,7 @@ pub use self::validate::*;
|
||||
use self::scheme::Scheme as _;
|
||||
|
||||
use self::data::{Map, SigAction, Stat, TimeSpec};
|
||||
use self::error::{Error, Result, ENOSYS, EINVAL};
|
||||
use self::error::{Error, Result, ENOSYS};
|
||||
use self::flag::{MapFlags, PhysmapFlags, WaitFlags};
|
||||
use self::number::*;
|
||||
|
||||
@@ -62,9 +62,9 @@ pub mod validate;
|
||||
|
||||
/// 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, bp: usize, stack: &mut InterruptStack) -> usize {
|
||||
pub fn syscall(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, stack: &mut InterruptStack) -> usize {
|
||||
#[inline(always)]
|
||||
fn inner(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, bp: usize, stack: &mut InterruptStack) -> Result<usize> {
|
||||
fn inner(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, stack: &mut InterruptStack) -> Result<usize> {
|
||||
//SYS_* is declared in kernel/syscall/src/number.rs
|
||||
match a & SYS_CLASS {
|
||||
SYS_CLASS_FILE => {
|
||||
@@ -217,7 +217,7 @@ pub fn syscall(a: usize, b: usize, c: usize, d: usize, e: usize, f: usize, bp: u
|
||||
}
|
||||
}
|
||||
|
||||
let result = inner(a, b, c, d, e, f, bp, stack);
|
||||
let result = inner(a, b, c, d, e, f, stack);
|
||||
|
||||
{
|
||||
let contexts = crate::context::contexts();
|
||||
|
||||
@@ -11,13 +11,13 @@ use crate::context::{Context, ContextId, memory::AddrSpace, WaitpidKey};
|
||||
use crate::Bootstrap;
|
||||
use crate::context;
|
||||
use crate::interrupt;
|
||||
use crate::paging::mapper::{Flusher, InactiveFlusher, PageFlushAll};
|
||||
use crate::paging::mapper::{InactiveFlusher, PageFlushAll};
|
||||
use crate::paging::{Page, PageFlags, VirtualAddress, PAGE_SIZE};
|
||||
use crate::ptrace;
|
||||
use crate::start::usermode;
|
||||
use crate::syscall::data::SigAction;
|
||||
use crate::syscall::error::*;
|
||||
use crate::syscall::flag::{wifcontinued, wifstopped, MapFlags, PROT_EXEC, PROT_READ, PROT_WRITE,
|
||||
use crate::syscall::flag::{wifcontinued, wifstopped, MapFlags,
|
||||
PTRACE_STOP_EXIT, SIG_BLOCK, SIG_SETMASK, SIG_UNBLOCK,
|
||||
SIGCONT, SIGTERM, WaitFlags, WCONTINUED, WNOHANG, WUNTRACED};
|
||||
use crate::syscall::ptrace_event;
|
||||
|
||||
Reference in New Issue
Block a user