mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
kernel: fix warnings
This commit is contained in:
parent
a027fc6a2c
commit
723a730231
4 changed files with 13 additions and 9 deletions
|
|
@ -43,6 +43,7 @@ impl Default for MemoryMapping {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MemoryMapping {
|
impl MemoryMapping {
|
||||||
|
#[allow(dead_code)]
|
||||||
pub unsafe fn from_raw(&mut self, _: usize) {
|
pub unsafe fn from_raw(&mut self, _: usize) {
|
||||||
unimplemented!("Use from_init_process instead");
|
unimplemented!("Use from_init_process instead");
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +53,7 @@ impl MemoryMapping {
|
||||||
self.pid = init.pid();
|
self.pid = init.pid();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub unsafe fn allocate(&mut self, pid: PID) -> Result<(), xous_kernel::Error> {
|
pub unsafe fn allocate(&mut self, _pid: PID) -> Result<(), xous_kernel::Error> {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -425,12 +426,12 @@ pub fn unmap_page_inner(
|
||||||
|
|
||||||
/// Move a page from one address space to another.
|
/// Move a page from one address space to another.
|
||||||
pub fn move_page_inner(
|
pub fn move_page_inner(
|
||||||
mm: &mut MemoryManager,
|
_mm: &mut MemoryManager,
|
||||||
src_space: &MemoryMapping,
|
_src_space: &MemoryMapping,
|
||||||
src_addr: *mut u8,
|
_src_addr: *mut u8,
|
||||||
dest_pid: PID,
|
_dest_pid: PID,
|
||||||
dest_space: &MemoryMapping,
|
_dest_space: &MemoryMapping,
|
||||||
dest_addr: *mut u8,
|
_dest_addr: *mut u8,
|
||||||
) -> Result<(), xous_kernel::Error> {
|
) -> Result<(), xous_kernel::Error> {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
|
@ -733,11 +734,11 @@ pub fn address_available(virt: usize) -> bool {
|
||||||
///
|
///
|
||||||
/// * **None**: The page is not valid or is shared
|
/// * **None**: The page is not valid or is shared
|
||||||
/// * **Some(MemoryFlags)**: The translated sharing permissions of the given flags
|
/// * **Some(MemoryFlags)**: The translated sharing permissions of the given flags
|
||||||
pub fn page_flags(virt: usize) -> Option<MemoryFlags> {
|
pub fn page_flags(_virt: usize) -> Option<MemoryFlags> {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_page_flags(virt: usize, flags: MemoryFlags) -> Result<(), xous_kernel::Error> {
|
pub fn update_page_flags(_virt: usize, _flags: MemoryFlags) -> Result<(), xous_kernel::Error> {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -425,6 +425,7 @@ impl Process {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn print_current_thread(&self) {
|
pub fn print_current_thread(&self) {
|
||||||
let thread = self.current_thread();
|
let thread = self.current_thread();
|
||||||
let tid = self.current_tid();
|
let tid = self.current_tid();
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@ impl MemoryMapping {
|
||||||
// pub fn set(&mut self, root_addr: usize, pid: PID) {
|
// pub fn set(&mut self, root_addr: usize, pid: PID) {
|
||||||
// self.satp: 0x8000_0000 | (((pid as usize) << 22) & (((1 << 9) - 1) << 22)) | (root_addr >> 12)
|
// self.satp: 0x8000_0000 | (((pid as usize) << 22) & (((1 << 9) - 1) << 22)) | (root_addr >> 12)
|
||||||
// }
|
// }
|
||||||
|
#[allow(dead_code)]
|
||||||
pub unsafe fn from_raw(&mut self, satp: usize) {
|
pub unsafe fn from_raw(&mut self, satp: usize) {
|
||||||
self.satp = satp;
|
self.satp = satp;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2330,6 +2330,7 @@ impl SystemServices {
|
||||||
/// 2. The process has no exception handler
|
/// 2. The process has no exception handler
|
||||||
/// 3. The process is not "Running" or "Ready"
|
/// 3. The process is not "Running" or "Ready"
|
||||||
#[cfg(baremetal)]
|
#[cfg(baremetal)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn begin_exception_handler(&mut self, pid: PID) -> Option<ExceptionHandler> {
|
pub fn begin_exception_handler(&mut self, pid: PID) -> Option<ExceptionHandler> {
|
||||||
let process = self.get_process_mut(pid).ok()?;
|
let process = self.get_process_mut(pid).ok()?;
|
||||||
let handler = process.exception_handler?;
|
let handler = process.exception_handler?;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue