Strictly speaking, 'volatile int' is not guaranteed for atomic writes by the C standard. However glibc says in practice 'volatile int' should be fine. Fix it either way.