Doubts about atomic operations

my understanding of atomicity is either not done or finished.

A variable with atomic operations atomic < int > gCounter; . There are two threads that perform write operations on gCounter . If these two threads happen to perform write operations at the same time, won"t this result in data-race?

I know it will not cause data-race, but I looked up the information on the Internet and found nothing that can refute my above point of view. My personal guess is that the processor will add locks when performing atomic operations, but of course this is just a personal guess.

I hope someone will answer the question.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1beb63b-46004.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1beb63b-46004.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?