This looks like the only place in this file that we depend on `pthread_self()` returning zero to indicate something special. Might be worth a comment, as this depends on special internals of how we implement pthreads I believe.