Remove guard generics from xarray::Cursor

This commit is contained in:
Ruihan Li
2025-05-13 23:57:26 +08:00
committed by Tate, Hongliang Tian
parent 72fb0752ae
commit 14388da548
5 changed files with 79 additions and 72 deletions

View File

@ -2,8 +2,6 @@
use core::sync::atomic::{AtomicU64, Ordering};
use ostd::sync::SpinGuardian;
use crate::XLockGuard;
/// A mark used to indicate which slots in an [`XNode`] contain items that have been marked.
@ -28,7 +26,7 @@ impl Mark {
Self::new(0)
}
pub fn update<G: SpinGuardian>(&self, offset: u8, set: bool, _guard: &XLockGuard<G>) -> bool {
pub fn update(&self, _guard: XLockGuard, offset: u8, set: bool) -> bool {
let old_val = self.inner.load(Ordering::Acquire);
let new_val = if set {
old_val | (1 << offset as u64)