How to ensure memory consistency with memcpy in a seq_lock implementation for reader/writer threads?
I am using a seq_lock for coordination between a reader and a writer thread. The reader calls load(), and the writer calls store(). Here’s a simplified version of my code: