1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-24 17:06:18 +04:00

Add expr3 report(not finiished.

This commit is contained in:
lcy1996 2018-10-30 21:50:38 +08:00
parent 2c3de7b222
commit 504401355f
3 changed files with 10 additions and 1 deletions

View File

@ -259,6 +259,7 @@ impl<T: PageTable, M: SwapManager, S: Swapper> SwapExt<T, M, S> {
** @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 {
// 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() {
return false;
}

View File

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

View File

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