Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf2019 committed Aug 4, 2024
1 parent c1167e6 commit d61a47e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,16 @@ impl MappingBackend<MockFlags, MockPageTable> for MockBackend {
&self,
start: VirtAddr,
size: usize,
old_flags: MockFlags,
new_flags: MockFlags,
pt: &mut MockPageTable,
) -> Option<MockFlags> {
if (old_flags & 0x7) == (new_flags & 0x7) {
return None;
}
let flags = (new_flags & 0x7) | (old_flags & !0x7);
) -> bool {
for entry in pt.iter_mut().skip(start.as_usize()).take(size) {
*entry = flags;
if *entry == 0 {
return false;
}
*entry = new_flags;
}
Some(flags)
true
}
}
```

0 comments on commit d61a47e

Please sign in to comment.