[PATCH] Fix atomicity of TIF update in flush_thread() for x86_64