diff options
author | 2019-05-03 18:28:54 -0700 | |
---|---|---|
committer | 2019-05-03 18:28:54 -0700 | |
commit | af776f308e97e24f4eb3d63272596a505c3debe6 (patch) | |
tree | 5cf55f1772873d415fd9e5568abdabceb308465f /src | |
parent | 842e6c74a66264090eb4e343339a5cd39944d916 (diff) | |
download | rust-x86-af776f308e97e24f4eb3d63272596a505c3debe6.tar.gz rust-x86-af776f308e97e24f4eb3d63272596a505c3debe6.tar.zst rust-x86-af776f308e97e24f4eb3d63272596a505c3debe6.zip |
Update paging struct.
Diffstat (limited to 'src')
-rw-r--r-- | src/bits64/paging.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bits64/paging.rs b/src/bits64/paging.rs index 879ddca..f08442a 100644 --- a/src/bits64/paging.rs +++ b/src/bits64/paging.rs @@ -25,6 +25,12 @@ impl PAddr { pub const fn as_u64(&self) -> u64 { self.0 } + + /// Convert to `usize` + pub const fn as_usize(&self) -> usize { + self.0 as usize + } + /// Convert from `64` pub const fn from_u64(p: u64) -> Self { PAddr(p) |