feat: implement configure_protection and map_shared with real page mapping, remove dead context_switch from Platform trait
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#![no_std]
|
||||
|
||||
use domain::{memory::MemoryRegion, thread::SavedContext};
|
||||
use domain::memory::MemoryRegion;
|
||||
use types::{
|
||||
address::{EntryPoint, PhysicalAddress, StackPointer},
|
||||
bounded::PageCount,
|
||||
@@ -9,11 +9,8 @@ use types::{
|
||||
time::{Ticks, TimerDuration},
|
||||
};
|
||||
|
||||
pub trait PlatformContext: Copy + Default {}
|
||||
|
||||
pub trait Platform {
|
||||
fn configure_protection(&mut self, process: ProcessId, regions: &[MemoryRegion]);
|
||||
fn context_switch(&mut self, from: &mut SavedContext, to: &SavedContext);
|
||||
fn enable_user_mode(&mut self, entry: EntryPoint, stack: StackPointer) -> !;
|
||||
fn set_timer(&mut self, duration: TimerDuration);
|
||||
fn current_ticks(&self) -> Ticks;
|
||||
|
||||
Reference in New Issue
Block a user