modify atomic function
Merge https://github.com/yjhjstz/think