Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/addr.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use memory_addr::{AddrRange, PhysAddr, VirtAddr, def_usize_addr, def_usize_addr_formatter};
pub use memory_addr::{AddrRange, PhysAddr, VirtAddr};
use memory_addr::{def_usize_addr, def_usize_addr_formatter};

/// Host virtual address.
pub type HostVirtAddr = VirtAddr;
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pub use address_space::*;
pub use frame::PhysFrame;
pub use hal::AxMmHal;

use axerrno::AxError;
use memory_set::MappingError;
pub use axerrno::AxError;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 使用者不需要去挨个添加这些结构体所在的crate,只用依赖这一个crate.
  2. 如果依赖这个crate, 这个crate axerrno 版本是 0.1 , 而自身又要使用 axerrno 0.2, 将会造成不兼容,若其他crate 用了 axerrno 0.3 并且也没重新导出,则更加无法兼容,除非修改所有依赖的crate axerrno 版本,否则无法使用。若都使用重新导出的方式,则 0.1 0.2 0.3 可以共存。可参照 aarch64-cpu crate,重新导出了tock-registors, arceos- 0.9 0.8 0.10 版本的tock-registors 同时存在

pub use memory_set::MappingError;

/// Information about nested page faults.
#[derive(Debug)]
Expand Down