Home | Info | Community | Development | myReactOS | Contact Us
xmlRMutexUnlock: : the reentrant mutex
xmlRMutexUnlock() is used to unlock a libxml2 token_r.
Definition at line 400 of file threads.c.
Referenced by xmlDictFree(), xmlDictReference(), and xmlUnlockLibrary().
{ if (tok == NULL) return; #ifdef HAVE_PTHREAD_H if (libxml_is_threaded == 0) return; pthread_mutex_lock(&tok->lock); tok->held--; if (tok->held == 0) { if (tok->waiters) pthread_cond_signal(&tok->cv); memset(&tok->tid, 0, sizeof(tok->tid)); } pthread_mutex_unlock(&tok->lock); #elif defined HAVE_WIN32_THREADS if (!--tok->count) LeaveCriticalSection(&tok->cs); #elif defined HAVE_BEOS_THREADS if (tok->lock->tid == find_thread(NULL)) { tok->count--; if (tok->count == 0) { xmlMutexUnlock(tok->lock); } return; } #endif }