rem: while (master.owner != self && master.count > 0) {
add: while (!pthread_equal(master.owner, self) && master.count > 0) {
context: Ns_MasterLock(void){    static pthread_once_t once = PTHREAD_ONCE_INIT;    static char *func = "Ns_MasterLock";    pthread_t self = pthread_self();    int err;    /*     * Initialize the master lock and condition the first time.     */    err = pthread_once(&once, InitMaster);    if (err != 0) {        NsThreadFatal(func, "pthread_once", err);    }    /*     * Enter the critical section.     */    err = pthread_mutex_lock(&master.lock);    if (err != 0) {        NsThreadFatal(func, "pthread_mutex_lock", err);    }    while (master.owner != self && master.count > 0) {	pthread_cond_wait(&master.cond, &master.lock);	if (err != 0) {	    NsThreadFatal(func, "pthread_cond_wait", err);	}    }    master.owner = self;    ++master.count;    err = pthread_mutex_unlock(&master.lock);    if (err != 0) {        NsThreadFatal(func, "pthread_mutex_unlock", err);    }}