Is there any advantage of using pthread primitives here when we use CThread et. al. anyway?  Why not use CCriticalSection et al?