besides what was pointed out in the answer of nosid, your code has another huge problem, even without the security leak you basically found yourself (it is fixed in nosids answer as well)
Let's assume you are having 3 threads running over your code:
Thread A gets to the atomic bool, sets it to true, executes singular process.
Now thread B arrives, finds a true. The thread skips singular_process, but now sets your atomic bool to true! But Thread A may be still working on singular process!
So when now thread C arrives at the initial check, it is told by your bool, that it is entirely okay to execute singular process. And suddenly A and C are executing your singular process at the same time.