Quantcast
Channel: Why atomic store on variable that cross cache-line boundaries compiles to normal MOV store instruction? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Peter Cordes for Why atomic store on variable that cross cache-line...

Correct, the store isn't atomic in that case, misaligned atomic operations aren't supported in GNU C.You created a misaligned uint64_t and took its address. That's not safe in general. Packed structs...

View Article



Why atomic store on variable that cross cache-line boundaries compiles to...

let's look on the code#include <stdint.h>#pragma pack (push,1)typedef struct test_s{ uint64_t a1; uint64_t a2; uint64_t a3; uint64_t a4; uint64_t a5; uint64_t a6; uint64_t a7; uint8_t b1;...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images