mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-04 00:44:19 +01:00
remove unused PAGE_ERROR flag
This commit is contained in:
@@ -128,8 +128,6 @@ pub type PageRef = Arc<Page>;
|
||||
|
||||
/// Page is locked for I/O to prevent concurrent access.
|
||||
const PAGE_LOCKED: usize = 0b010;
|
||||
/// Page had an I/O error.
|
||||
const PAGE_ERROR: usize = 0b100;
|
||||
/// Page is dirty. Flush needed.
|
||||
const PAGE_DIRTY: usize = 0b1000;
|
||||
/// Page's contents are loaded in memory.
|
||||
@@ -168,18 +166,6 @@ impl Page {
|
||||
self.get().flags.fetch_and(!PAGE_LOCKED, Ordering::Release);
|
||||
}
|
||||
|
||||
pub fn is_error(&self) -> bool {
|
||||
self.get().flags.load(Ordering::Relaxed) & PAGE_ERROR != 0
|
||||
}
|
||||
|
||||
pub fn set_error(&self) {
|
||||
self.get().flags.fetch_or(PAGE_ERROR, Ordering::Release);
|
||||
}
|
||||
|
||||
pub fn clear_error(&self) {
|
||||
self.get().flags.fetch_and(!PAGE_ERROR, Ordering::Release);
|
||||
}
|
||||
|
||||
pub fn is_dirty(&self) -> bool {
|
||||
self.get().flags.load(Ordering::Acquire) & PAGE_DIRTY != 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user