It can't. If the thread is woken spuriously, it will re-compare the value and wait again if unchanged.