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

Function xmlCheckThreadLocalStorage

ThirdParty/libxml2/vtklibxml2/globals.c:974–981  ·  view source on GitHub ↗

* xmlCheckThreadLocalStorage: * * Check whether thread-local storage could be allocated. * * In cross-platform code running in multithreaded environments, this * function should be called once in each thread before calling other * library functions to make sure that thread-local storage was * allocated properly. * * Returns 0 on success or -1 if a memory allocation failed. A failed * all

Source from the content-addressed store, hash-verified

972 * Available since v2.12.0.
973 */
974int
975xmlCheckThreadLocalStorage(void) {
976#if defined(LIBXML_THREAD_ENABLED) && !defined(USE_TLS)
977 if ((!xmlIsMainThreadInternal()) && (xmlGetThreadLocalStorage(1) == NULL))
978 return(-1);
979#endif
980 return(0);
981}
982
983/** DOC_DISABLE */
984

Callers

nothing calls this directly

Calls 2

xmlIsMainThreadInternalFunction · 0.85
xmlGetThreadLocalStorageFunction · 0.85

Tested by

no test coverage detected