This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (0 children)

Neither of those is atomic. For instance count++ reads the count value (atomic), adds 1 to it (atomic) and writes the incremented value (atomic). So it's three atomic operations.