(I think you are mistaken about other race conditions... the pthread code takes care of those nicely.)