Skip to content

Add AtomicTwoPtr (or AtomicTaggedPtr) #214

@taiki-e

Description

@taiki-e

Similar to AtomicU128 for 64-bit systems and AtomicU64 for 32-bit systems, but strict-provenance compatible. (Although, at this time, there is no way to implement cfg(miri) code in lockfree way.)

Intended use case is construct of tagged ptr. (This type is two pointer not pointer and integer, because there is a use case of two pointers and one tag...: taiki-e/atomic-maybe-uninit#23 (comment)
But we might want to ignore that use case and add AtomicTaggedPtr for now.)

This has been used in my private projects for a few years now and has been mentioned several times before. (taiki-e/atomic-maybe-uninit#23 (comment), #116 (comment))

Other name candidates: AtomicDoublePtr, AtomicPtrPair

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: A new feature or an improvement for an existing one

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions