Implement spurious wakeup for ATOMIC_WAIT