Quantcast
Channel: Do I use atomic over shared memory correctly here - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Nick for Do I use atomic over shared memory correctly here

Because C++atomic are not very "clear" to use, you can use stdatomic.h.https://en.cppreference.com/w/c/atomic/atomic_loadHowever I failed to compile example with these on gcc.This is why I decided to...

View Article


Answer by Alex Guteniev for Do I use atomic over shared memory correctly here

What I am worrying:no placement new, just reinterpret cast + initial value set.not a d-tor either.why sizeof(uint16_t) is same as sizeof(std::atomic<uint16_t>) - is it always like this if...

View Article

Do I use atomic over shared memory correctly here

Suppose we have two processes.Both use same mmap-ed memory region in order to pass some information, in this case uint16_t.I read all kind of opinions why std::atomic<> should work, if it uses...

View Article
Browsing latest articles
Browse All 3 View Live