Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

it's not guaranteed atomic, and if you ARE using volatiles, "maybe" doesn't really cut it, so now you need to do `++*v` the proper way (ex. `lock cmpxchg` / `__atomic_compare_exchange`), or explicitly write it out the long way (`*v = *v + 1`) and risk the small chance of the value changing under you between read/write


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

Search: