thread_single: wait for P_STOPPED_SINGLE to pass
(cherry picked from commit d7a9e6e74067f70eeec74dcd64a9bcc851503a6e)