Proper way to initialize an atomic variable in shared_memory
I have a portion of shared memory (a file that is created in /dev/shm
and then file-mapped), and I need some synchronization between processes using it. So the memory portion have a header with an atomic variable within, and I have the problem that I’m not sure how to properly initialize the header.