MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlRMutexUnlock

Function xmlRMutexUnlock

ThirdParty/libxml2/vtklibxml2/threads.c:333–353  ·  view source on GitHub ↗

* xmlRMutexUnlock: * @tok: the reentrant mutex * * xmlRMutexUnlock() is used to unlock a libxml2 token_r. */

Source from the content-addressed store, hash-verified

331 * xmlRMutexUnlock() is used to unlock a libxml2 token_r.
332 */
333void
334xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
335{
336 if (tok == NULL)
337 return;
338#ifdef HAVE_POSIX_THREADS
339 if (XML_IS_THREADED() == 0)
340 return;
341
342 pthread_mutex_lock(&tok->lock);
343 tok->held--;
344 if (tok->held == 0) {
345 if (tok->waiters)
346 pthread_cond_signal(&tok->cv);
347 memset(&tok->tid, 0, sizeof(tok->tid));
348 }
349 pthread_mutex_unlock(&tok->lock);
350#elif defined HAVE_WIN32_THREADS
351 LeaveCriticalSection(&tok->cs);
352#endif
353}
354
355/************************************************************************
356 * *

Callers 8

xmlFetchXMLCatalogFileFunction · 0.85
xmlInitializeCatalogFunction · 0.85
xmlLoadCatalogFunction · 0.85
xmlCatalogCleanupFunction · 0.85
xmlCatalogAddFunction · 0.85
xmlCatalogRemoveFunction · 0.85
xmlCatalogConvertFunction · 0.85
xmlUnlockLibraryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected