Skip to content

queen-os/atomic-stamped-ptr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atomic-stamped-ptr

AtomicPtr with stamp to avoid ABA problem

Examples

use atomic_stamped_ptr::{AtomicStampedPtr, StampedPtr, Ordering};
let some_ptr  = AtomicStampedPtr::new(&mut 5);
let other_ptr = &mut 10;
let old_stamped_ptr = some_ptr.load(Ordering::Relaxed);
some_ptr.store(old_stamped_ptr.successor(other_ptr), Ordering::Relaxed);
// or
some_ptr.store(StampedPtr::new(other_ptr), Ordering::Relaxed);

License: MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages