Revert "remove __sync_synchronize  #1"

This reverts commit 0bd4f18c8b970bb3e4521fde2e4b2bc7508b5b87.