Skip to content

Commit

Permalink
📝 fix compare exchange addr
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Jan 15, 2025
1 parent 7451c9e commit 4299563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<T> LinkWrapper<T> {
match self.ptr.compare_exchange(old, new, success, failure) {
Ok(_) => Ok(current),
Err(addr) => {
let addr = addr >> LEADING_BITS;
let addr = (addr & !REFCOUNT_MASK) >> LEADING_BITS;
Err(Ptr { addr }.ptr())
}
}
Expand Down

0 comments on commit 4299563

Please sign in to comment.