Skip to content

sync/atomic: add Exchange operation #5722

@dvyukov

Description

@dvyukov
Add atomic Exchange operation to sync/atomic package.

Exchange is a part of gentleman's atomic set of operations. It's
provided by C/C++/Java/etc.
Exchange is useful for some stack/queue algorithms; stats counters
(load and reset to 0); runtime uses runtime·xchg in locks, scheduler
and GC.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions