Go to the source code of this file.
◆ xmlCleanupGlobalsInternal()
xmlCleanupGlobalsInternal:
Additional cleanup for multi-threading
Definition at line 617 of file globals.c.
617 {
619
621
622#ifdef HAVE_POSIX_THREADS
623#ifdef XML_PTHREAD_WEAK
624 if (libxml_is_threaded == 0)
625 return;
626#endif
627 pthread_key_delete(globalkey);
628#elif defined(HAVE_WIN32_THREADS)
629#ifndef USE_TLS
633 }
634#endif
635#endif
636
638}
BOOL WINAPI TlsFree(IN DWORD Index)
XML_HIDDEN void xmlCleanupMutex(xmlMutexPtr mutex)
static int parserInitialized
static xmlMutex xmlThrDefMutex
#define TLS_OUT_OF_INDEXES
XMLPUBFUN void xmlResetError(xmlErrorPtr err)
Referenced by xmlCleanupParser().
◆ xmlInitGlobalsInternal()
xmlInitGlobalsInternal:
Additional initialisation for multi-threading
Definition at line 571 of file globals.c.
571 {
573
574#ifdef HAVE_POSIX_THREADS
575#ifdef XML_PTHREAD_WEAK
576 if (libxml_is_threaded == -1)
577 libxml_is_threaded =
578 (pthread_getspecific !=
NULL) &&
579 (pthread_setspecific !=
NULL) &&
580 (pthread_key_create !=
NULL) &&
581 (pthread_key_delete !=
NULL) &&
582
583
584
585
586
587 (pthread_self !=
NULL);
588 if (libxml_is_threaded == 0)
589 return;
590#endif
591 pthread_key_create(&globalkey, xmlFreeGlobalState);
592 mainthread = pthread_self();
593#elif defined(HAVE_WIN32_THREADS)
594#ifndef USE_TLS
596#endif
598#endif
599}
DWORD WINAPI DECLSPEC_HOTPATCH TlsAlloc(void)
XML_HIDDEN void xmlInitMutex(xmlMutexPtr mutex)
DWORD WINAPI GetCurrentThreadId(void)
Referenced by xmlInitParser().