This slide wants to say that due to programming errors, atomic region can still suffer from atomicity violation. In this example, the atomic region was erroneously separately in two blocks for thread 1, which makes it possible for thread 2 to make ptr = NULL in between atomic blocks of thread 1. The simple fix is to combine two atomic regions into one for thread 1, but this might result in performance issues.
This slide wants to say that due to programming errors, atomic region can still suffer from atomicity violation. In this example, the atomic region was erroneously separately in two blocks for thread 1, which makes it possible for thread 2 to make ptr = NULL in between atomic blocks of thread 1. The simple fix is to combine two atomic regions into one for thread 1, but this might result in performance issues.