2 ms·
> what's the difference between an acquire and a release atomic access ACQUIRE prevents reordering any loads and stores from after the barrier to before. RELEA
by exDM69 10y ago
> what's the difference between an acquire and a release atomic access
ACQUIRE prevents reordering any loads and stores from after the barrier to before. RELEASE is the opposite, no load or store before it may happen after the barrier.
ACQUIRE is what you use when locking a spinlock, RELEASE is when you unlock.
Put these incorrectly and you're not guaranteed to have all loads and stores happening when the spinlock is locked, and your program is no longer guaranteed to behave as expected.