Add expr3 report(not finiished.

master
lcy1996 6 years ago
parent 2c3de7b222
commit 504401355f

@ -259,6 +259,7 @@ impl<T: PageTable, M: SwapManager, S: Swapper> SwapExt<T, M, S> {
** @retval bool whether swap in happens. ** @retval bool whether swap in happens.
*/ */
pub fn page_fault_handler<T2: InactivePageTable>(&mut self, pt: *mut T2, addr: VirtAddr, alloc_frame: impl FnOnce() -> PhysAddr) -> bool { pub fn page_fault_handler<T2: InactivePageTable>(&mut self, pt: *mut T2, addr: VirtAddr, alloc_frame: impl FnOnce() -> PhysAddr) -> bool {
// now we didn't attach the cow so the present will be false when swapped(), to enable the cow some changes will be needed
if !self.page_table.get_entry(addr).swapped() { if !self.page_table.get_entry(addr).swapped() {
return false; return false;
} }

@ -0,0 +1,9 @@
# Rust OS 教学lab实验的制作 基础功能完善
## 1 内存管理
@刘辰屹
## 2 进程管理
@陈秋昊
## 3 同步互斥
@陈秋昊
## 4 文件系统
@朱书聪

@ -7,7 +7,6 @@ use ucore_memory::{*, paging::PageTable};
use ucore_memory::cow::CowExt; use ucore_memory::cow::CowExt;
pub use ucore_memory::memory_set::{MemoryArea, MemoryAttr, MemorySet as MemorySet_, Stack}; pub use ucore_memory::memory_set::{MemoryArea, MemoryAttr, MemorySet as MemorySet_, Stack};
use ucore_memory::swap::*; use ucore_memory::swap::*;
use alloc::collections::VecDeque;
use process::processor; use process::processor;
pub type MemorySet = MemorySet_<InactivePageTable0>; pub type MemorySet = MemorySet_<InactivePageTable0>;

Loading…
Cancel
Save