Expand description
A simple lock-free radix tree.
Implementations
sourceimpl<T> PageTable<T>where
T: 'static + Send + Sync,
impl<T> PageTable<T>where
T: 'static + Send + Sync,
sourcepub fn swap<'g>(
&self,
pid: PageId,
new: Shared<'g, T>,
guard: &'g Guard
) -> Shared<'g, T>
pub fn swap<'g>(
&self,
pid: PageId,
new: Shared<'g, T>,
guard: &'g Guard
) -> Shared<'g, T>
Atomically swap the previous value in a tree with a new one.
sourcepub fn cas<'g>(
&self,
pid: PageId,
old: Shared<'g, T>,
new: Shared<'g, T>,
guard: &'g Guard
) -> Result<Shared<'g, T>, Shared<'g, T>>
pub fn cas<'g>(
&self,
pid: PageId,
old: Shared<'g, T>,
new: Shared<'g, T>,
guard: &'g Guard
) -> Result<Shared<'g, T>, Shared<'g, T>>
Compare and swap an old value to a new one.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for PageTable<T>where
T: RefUnwindSafe,
impl<T> Send for PageTable<T>
impl<T> Sync for PageTable<T>
impl<T> Unpin for PageTable<T>
impl<T> UnwindSafe for PageTable<T>where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more