ReactOS 0.4.16-dev-258-g81860b4
|
#include "libxml.h"
#include <string.h>
#include <stdlib.h>
#include <libxml/threads.h>
#include <libxml/globals.h>
Go to the source code of this file.
Classes | |
struct | _xmlMutex |
struct | _xmlRMutex |
Macros | |
#define | IN_LIBXML |
Variables | |
static xmlRMutexPtr | xmlLibraryLock = NULL |
#define IN_LIBXML |
threads.c: set of generic threading related routines
See Copyright for the status of this software.
Gary Pennington Gary..nosp@m.Penn.nosp@m.ingto.nosp@m.n@uk.nosp@m..sun..nosp@m.com danie.nosp@m.l@ve.nosp@m.illar.nosp@m.d.co.nosp@m.m
xmlGlobalInitMutexDestroy
Makes sure that the global initialization mutex is destroyed before application termination.
Definition at line 512 of file threads.c.
Referenced by xmlCleanupGlobals().
xmlGlobalInitMutexLock
Makes sure that the global initialization mutex is initialized and locks it.
Definition at line 413 of file threads.c.
Referenced by xmlInitParser().
Definition at line 488 of file threads.c.
Referenced by xmlInitParser().
xmlCleanupThreads:
DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all.
xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended.
WARNING: if your application is multithreaded or has plugin support calling this may crash the application if another thread or a plugin is still using libxml2. It's sometimes very hard to guess if libxml2 is in use in the application, some libraries or plugins may use it without notice. In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind !
Definition at line 900 of file threads.c.
Referenced by xmlCleanupParser().
void xmlFreeMutex | ( | xmlMutexPtr | tok | ) |
xmlFreeMutex: @tok: the simple mutex
xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct.
Definition at line 197 of file threads.c.
Referenced by xmlCleanupGlobals(), xmlCleanupMemory(), xmlDictCleanup(), xmlFreeRMutex(), and xsltCleanupGlobals().
void xmlFreeRMutex | ( | xmlRMutexPtr tok | ATTRIBUTE_UNUSED | ) |
xmlFreeRMutex: @tok: the reentrant mutex
xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex.
Definition at line 309 of file threads.c.
Referenced by xsltUninit().
xmlGlobalStatePtr xmlGetGlobalState | ( | void | ) |
xmlGetGlobalState:
xmlGetGlobalState() is called to retrieve the global state for a thread.
Returns the thread global state or NULL in case of error
Definition at line 640 of file threads.c.
Referenced by __oldXMLWDcompatibility(), __xmlBufferAllocScheme(), __xmlDefaultBufferSize(), __xmlDefaultSAXLocator(), __xmlDeregisterNodeDefaultValue(), __xmlDoValidityCheckingDefaultValue(), __xmlGenericError(), __xmlGenericErrorContext(), __xmlGetWarningsDefaultValue(), __xmlIndentTreeOutput(), __xmlKeepBlanksDefaultValue(), __xmlLastError(), __xmlLineNumbersDefaultValue(), __xmlLoadExtDtdDefaultValue(), __xmlOutputBufferCreateFilenameValue(), __xmlParserDebugEntities(), __xmlParserInputBufferCreateFilenameValue(), __xmlParserVersion(), __xmlPedanticParserDefaultValue(), __xmlRegisterNodeDefaultValue(), __xmlSaveNoEmptyTags(), __xmlStructuredError(), __xmlStructuredErrorContext(), __xmlSubstituteEntitiesDefaultValue(), and __xmlTreeIndentString().
xmlGetThreadId:
xmlGetThreadId() find the current thread ID number Note that this is likely to be broken on some platforms using pthreads as the specification doesn't mandate pthread_t to be an integer type
Returns the current thread ID number
Definition at line 750 of file threads.c.
Referenced by xmlInitializeGlobalState().
xmlInitThreads:
DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library.
xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.
Definition at line 847 of file threads.c.
Referenced by xmlInitParser(), and xmlIsMainThread().
xmlIsMainThread:
xmlIsMainThread() check whether the current thread is the main thread.
Returns 1 if the current thread is the main thread, 0 otherwise
Definition at line 779 of file threads.c.
xmlLockLibrary:
xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.
Definition at line 814 of file threads.c.
void xmlMutexLock | ( | xmlMutexPtr | tok | ) |
xmlMutexLock: @tok: the simple mutex
xmlMutexLock() is used to lock a libxml2 token.
Definition at line 220 of file threads.c.
Referenced by __xmlInitializeDict(), __xmlRandom(), xmlDictFree(), xmlDictReference(), xmlInitializeGlobalState(), xmlMallocAtomicLoc(), xmlMallocLoc(), xmlMemBlocks(), xmlMemDisplay(), xmlMemDisplayLast(), xmlMemFree(), xmlMemShow(), xmlMemStrdupLoc(), xmlMemUsed(), xmlReallocLoc(), xmlRMutexLock(), xmlThrDefBufferAllocScheme(), xmlThrDefDefaultBufferSize(), xmlThrDefDeregisterNodeDefault(), xmlThrDefDoValidityCheckingDefaultValue(), xmlThrDefGetWarningsDefaultValue(), xmlThrDefIndentTreeOutput(), xmlThrDefKeepBlanksDefaultValue(), xmlThrDefLineNumbersDefaultValue(), xmlThrDefLoadExtDtdDefaultValue(), xmlThrDefOutputBufferCreateFilenameDefault(), xmlThrDefParserDebugEntities(), xmlThrDefParserInputBufferCreateFilenameDefault(), xmlThrDefPedanticParserDefaultValue(), xmlThrDefRegisterNodeDefault(), xmlThrDefSaveNoEmptyTags(), xmlThrDefSetGenericErrorFunc(), xmlThrDefSetStructuredErrorFunc(), xmlThrDefSubstituteEntitiesDefaultValue(), xmlThrDefTreeIndentString(), xsltCleanupGlobals(), xsltDebugDumpExtensions(), xsltExtModuleElementLookup(), xsltExtModuleElementPreComputeLookup(), xsltExtModuleFunctionLookup(), xsltExtModuleTopLevelLookup(), xsltGetExtData(), xsltPreComputeExtModuleElement(), xsltRegisterExtModuleElement(), xsltRegisterExtModuleFull(), xsltRegisterExtModuleFunction(), xsltRegisterExtModuleTopLevel(), xsltRegisterExtPrefix(), xsltStyleInitializeStylesheetModule(), xsltUnregisterAllExtModuleElement(), xsltUnregisterAllExtModuleFunction(), xsltUnregisterAllExtModules(), xsltUnregisterAllExtModuleTopLevel(), xsltUnregisterExtModule(), xsltUnregisterExtModuleElement(), xsltUnregisterExtModuleFunction(), and xsltUnregisterExtModuleTopLevel().
void xmlMutexUnlock | ( | xmlMutexPtr | tok | ) |
xmlMutexUnlock: @tok: the simple mutex
xmlMutexUnlock() is used to unlock a libxml2 token.
Definition at line 248 of file threads.c.
Referenced by __xmlInitializeDict(), __xmlRandom(), xmlDictFree(), xmlDictReference(), xmlInitializeGlobalState(), xmlMallocAtomicLoc(), xmlMallocLoc(), xmlMemBlocks(), xmlMemDisplay(), xmlMemDisplayLast(), xmlMemFree(), xmlMemShow(), xmlMemStrdupLoc(), xmlMemUsed(), xmlReallocLoc(), xmlRMutexUnlock(), xmlThrDefBufferAllocScheme(), xmlThrDefDefaultBufferSize(), xmlThrDefDeregisterNodeDefault(), xmlThrDefDoValidityCheckingDefaultValue(), xmlThrDefGetWarningsDefaultValue(), xmlThrDefIndentTreeOutput(), xmlThrDefKeepBlanksDefaultValue(), xmlThrDefLineNumbersDefaultValue(), xmlThrDefLoadExtDtdDefaultValue(), xmlThrDefOutputBufferCreateFilenameDefault(), xmlThrDefParserDebugEntities(), xmlThrDefParserInputBufferCreateFilenameDefault(), xmlThrDefPedanticParserDefaultValue(), xmlThrDefRegisterNodeDefault(), xmlThrDefSaveNoEmptyTags(), xmlThrDefSetGenericErrorFunc(), xmlThrDefSetStructuredErrorFunc(), xmlThrDefSubstituteEntitiesDefaultValue(), xmlThrDefTreeIndentString(), xsltCleanupGlobals(), xsltDebugDumpExtensions(), xsltExtModuleElementLookup(), xsltExtModuleElementPreComputeLookup(), xsltExtModuleFunctionLookup(), xsltExtModuleTopLevelLookup(), xsltGetExtData(), xsltPreComputeExtModuleElement(), xsltRegisterExtModuleElement(), xsltRegisterExtModuleFull(), xsltRegisterExtModuleFunction(), xsltRegisterExtModuleTopLevel(), xsltRegisterExtPrefix(), xsltStyleInitializeStylesheetModule(), xsltUnregisterAllExtModuleElement(), xsltUnregisterAllExtModuleFunction(), xsltUnregisterAllExtModules(), xsltUnregisterAllExtModuleTopLevel(), xsltUnregisterExtModule(), xsltUnregisterExtModuleElement(), xsltUnregisterExtModuleFunction(), and xsltUnregisterExtModuleTopLevel().
xmlMutexPtr xmlNewMutex | ( | void | ) |
xmlNewMutex:
xmlNewMutex() is used to allocate a libxml2 token struct for use in synchronizing access to data.
Returns a new simple mutex pointer or NULL in case of error
Definition at line 168 of file threads.c.
Referenced by __xmlInitializeDict(), xmlInitGlobals(), xmlInitMemory(), xmlNewRMutex(), and xsltInitGlobals().
xmlRMutexPtr xmlNewRMutex | ( | void | ) |
xmlNewRMutex:
xmlRNewMutex() is used to allocate a reentrant mutex for use in synchronizing access to data. token_r is a re-entrant lock and thus useful for synchronizing access to data structures that may be manipulated in a recursive fashion.
Returns the new reentrant mutex pointer or NULL in case of error
Definition at line 276 of file threads.c.
Referenced by xsltInit().
void xmlRMutexLock | ( | xmlRMutexPtr | tok | ) |
xmlRMutexLock: @tok: the reentrant mutex
xmlRMutexLock() is used to lock a libxml2 token_r.
Definition at line 333 of file threads.c.
Referenced by xmlLockLibrary(), and xsltFreeLocales().
void xmlRMutexUnlock | ( | xmlRMutexPtr tok | ATTRIBUTE_UNUSED | ) |
xmlRMutexUnlock: @tok: the reentrant mutex
xmlRMutexUnlock() is used to unlock a libxml2 token_r.
Definition at line 377 of file threads.c.
Referenced by xmlUnlockLibrary(), and xsltFreeLocales().
xmlUnlockLibrary:
xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library.
Definition at line 829 of file threads.c.
|
static |
Definition at line 153 of file threads.c.
Referenced by xmlLockLibrary(), and xmlUnlockLibrary().