Skip to content
Snippets Groups Projects
Commit 2d041bbb authored by Robert Węcławski's avatar Robert Węcławski
Browse files

don't change counter in set_unused

parent 82bae0b3
No related branches found
No related tags found
No related merge requests found
...@@ -29,12 +29,12 @@ pub const COUNTER_MASK: u64 = 0x3ff00000_00000000; ...@@ -29,12 +29,12 @@ pub const COUNTER_MASK: u64 = 0x3ff00000_00000000;
impl Entry { impl Entry {
/// Is the entry unused? /// Is the entry unused?
pub fn is_unused(&self) -> bool { pub fn is_unused(&self) -> bool {
self.0 == 0 self.0 == (self.0 & COUNTER_MASK)
} }
/// Make the entry unused /// Make the entry unused
pub fn set_unused(&mut self) { pub fn set_unused(&mut self) {
self.0 = 0; self.0 = self.0 & COUNTER_MASK;
} }
/// Get the address this page references /// Get the address this page references
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment