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

Function xmlMutexLock

ThirdParty/libxml2/vtklibxml2/threads.c:201–217  ·  view source on GitHub ↗

* xmlMutexLock: * @tok: the simple mutex * * xmlMutexLock() is used to lock a libxml2 token. */

Source from the content-addressed store, hash-verified

199 * xmlMutexLock() is used to lock a libxml2 token.
200 */
201void
202xmlMutexLock(xmlMutexPtr tok)
203{
204 if (tok == NULL)
205 return;
206#ifdef HAVE_POSIX_THREADS
207 /*
208 * This assumes that __libc_single_threaded won't change while the
209 * lock is held.
210 */
211 if (XML_IS_THREADED() != 0)
212 pthread_mutex_lock(&tok->lock);
213#elif defined HAVE_WIN32_THREADS
214 EnterCriticalSection(&tok->cs);
215#endif
216
217}
218
219/**
220 * xmlMutexUnlock:

Callers 15

xmlDictReferenceFunction · 0.85
xmlDictFreeFunction · 0.85
xmlGlobalRandomFunction · 0.85
xmlMemMallocFunction · 0.85
xmlMemReallocFunction · 0.85
xmlMemFreeFunction · 0.85
xmlMemoryStrdupFunction · 0.85
xmlMemBlocksFunction · 0.85
xmlInitGlobalStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected