Is shareMemCnt++ atomic? atomic operation for shared memory

if count is a shared memory variable, is the statement “count++” a atomic operation?
or may it be implemented in machine language as
register1 = counter
register1 = register1 + 1
counter = register1?

if it’s not atomic, then I have to think of Mark’s colleague’s “tag and test” techinique, although i haven’t figured it out yet.


No, it is not atomic.