A few more pthread_testcancel()'s. Should be the last of them.