Renaming concepts around pages and frames

This commit renames `Frame` -> `UntypedFrame` and `Page` -> `Frame`.
So do other concepts in the following list:
 - `Segment` -> `UntypedSegment`,
 - `ContPages` -> `Segment`,
 - `DynPage` -> `AnyFrame`,
 - `PageMeta` -> `FrameMeta`,
 - `FrameMeta` -> `UntypedMeta`.

This commit also re-organized the source in the `mm/page` and `mm/frame`
module to accommodate the changes.
This commit is contained in:
Zhang Junyang
2024-12-17 15:04:38 +08:00
committed by Tate, Hongliang Tian
parent 10f1856306
commit c9a37ccab1
55 changed files with 1154 additions and 1160 deletions

View File

@ -7,11 +7,11 @@
//! The core virtual memory (VM) access APIs provided by this module are [`VmReader`] and
//! [`VmWriter`], which allow for writing to or reading from a region of memory _safely_.
//! `VmReader` and `VmWriter` objects can be constructed from memory regions of either typed memory
//! (e.g., `&[u8]`) or untyped memory (e.g, [`Frame`]). Behind the scene, `VmReader` and `VmWriter`
//! (e.g., `&[u8]`) or untyped memory (e.g, [`UntypedFrame`]). Behind the scene, `VmReader` and `VmWriter`
//! must be constructed via their [`from_user_space`] and [`from_kernel_space`] methods, whose
//! safety depends on whether the given memory regions are _valid_ or not.
//!
//! [`Frame`]: crate::mm::Frame
//! [`UntypedFrame`]: crate::mm::UntypedFrame
//! [`from_user_space`]: `VmReader::from_user_space`
//! [`from_kernel_space`]: `VmReader::from_kernel_space`
//!
@ -58,7 +58,7 @@ use crate::{
};
/// A trait that enables reading/writing data from/to a VM object,
/// e.g., [`Segment`], [`Vec<Frame>`] and [`Frame`].
/// e.g., [`UntypedSegment`], [`Vec<UntypedFrame>`] and [`UntypedFrame`].
///
/// # Concurrency
///
@ -67,8 +67,8 @@ use crate::{
/// desire predictability or atomicity, the users should add extra mechanism
/// for such properties.
///
/// [`Segment`]: crate::mm::Segment
/// [`Frame`]: crate::mm::Frame
/// [`UntypedSegment`]: crate::mm::UntypedSegment
/// [`UntypedFrame`]: crate::mm::UntypedFrame
pub trait VmIo: Send + Sync {
/// Reads requested data at a specified offset into a given `VmWriter`.
///