Hacker News new | past | comments | ask | show | jobs | submit login

Okay yeah, you're definitely right. I didn't realize that the stdatomic load/stores were by default seq_cst. The libraries I'm familiar with have macros for standalone atomic reads and writes, but you have to place any barriers manually. If you were using a library like that, you'd place them in between the memcpy and the pointer update, but here you get that for free.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: