common: make all calls to pthread_*() uniform