mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 10:23:23 +00:00
Refactor Vmar
and VmMapping
.
Co-authored-by: Zhang Junyang <junyang@stu.pku.edu.cn>
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
e453649d78
commit
4ea3e49788
@ -70,7 +70,7 @@ pub use pager::Pager;
|
||||
/// Compared with `Frame`,
|
||||
/// `Vmo` is easier to use (by offering more powerful APIs) and
|
||||
/// harder to misuse (thanks to its nature of being capability).
|
||||
///
|
||||
#[derive(Debug)]
|
||||
pub struct Vmo<R = Rights>(pub(super) Arc<Vmo_>, R);
|
||||
|
||||
/// Functions exist both for static capbility and dynamic capability
|
||||
@ -176,6 +176,15 @@ pub(super) struct Vmo_ {
|
||||
pages: Pages,
|
||||
}
|
||||
|
||||
impl Debug for Vmo_ {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("Vmo_")
|
||||
.field("flags", &self.flags)
|
||||
.field("size", &self.size())
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
/// Commit Flags.
|
||||
pub struct CommitFlags: u8 {
|
||||
|
Reference in New Issue
Block a user