check mutex owner in pthread_cond_wait