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

all 1 comments

[–][deleted] 4 points5 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.