Back to Turicreate

Module threads from libxml2

deps/src/libxml2-2.9.1/doc/html/libxml-threads.html

6.4.17.6 KB
Original Source

| |

|

|

|

Module threads from libxml2

|

|

|

|

|

|

| API Menu | |

|

| API Indexes | |

|

| Related links | |

|

|

|

|

|

|

| | schematron | | API documentation | | The XML C parser and toolkit of Gnome | tree | |

set of generic threading related routines should work with pthreads, Windows native or TLS threads

Table of Contents

Structure[xmlMutex](#xmlMutex)
struct _xmlMutex
The content of this structure is not made public by the API.
Typedef[xmlMutex](libxml-threads.html#xmlMutex)*xmlMutexPtr
Structure[xmlRMutex](#xmlRMutex)
struct _xmlRMutex
The content of this structure is not made public by the API.
Typedef[xmlRMutex](libxml-threads.html#xmlRMutex)*xmlRMutexPtr
void[xmlCleanupThreads](#xmlCleanupThreads)(void)
int[xmlDllMain](#xmlDllMain)(void * hinstDLL,
unsigned long fdwReason,
void * lpvReserved)
void[xmlFreeMutex](#xmlFreeMutex)([xmlMutexPtr](libxml-threads.html#xmlMutexPtr)tok)
void[xmlFreeRMutex](#xmlFreeRMutex)([xmlRMutexPtr](libxml-threads.html#xmlRMutexPtr)tok)
[xmlGlobalStatePtr](libxml-globals.html#xmlGlobalStatePtr)[xmlGetGlobalState](#xmlGetGlobalState)(void)
int[xmlGetThreadId](#xmlGetThreadId)(void)
void[xmlInitThreads](#xmlInitThreads)(void)
int[xmlIsMainThread](#xmlIsMainThread)(void)
void[xmlLockLibrary](#xmlLockLibrary)(void)
void[xmlMutexLock](#xmlMutexLock)([xmlMutexPtr](libxml-threads.html#xmlMutexPtr)tok)
void[xmlMutexUnlock](#xmlMutexUnlock)([xmlMutexPtr](libxml-threads.html#xmlMutexPtr)tok)
[xmlMutexPtr](libxml-threads.html#xmlMutexPtr)[xmlNewMutex](#xmlNewMutex)(void)
[xmlRMutexPtr](libxml-threads.html#xmlRMutexPtr)[xmlNewRMutex](#xmlNewRMutex)(void)
void[xmlRMutexLock](#xmlRMutexLock)([xmlRMutexPtr](libxml-threads.html#xmlRMutexPtr)tok)
void[xmlRMutexUnlock](#xmlRMutexUnlock)([xmlRMutexPtr](libxml-threads.html#xmlRMutexPtr)tok)
void[xmlUnlockLibrary](#xmlUnlockLibrary)(void)

Description

Structure xmlMutex

Structure xmlMutex
struct _xmlMutex {
The content of this structure is not made public by the API.
}

Structure xmlRMutex

Structure xmlRMutex
struct _xmlRMutex {
The content of this structure is not made public by the API.
}

Function: xmlCleanupThreads

void	xmlCleanupThreads (void)

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 !

Function: xmlDllMain

int	xmlDllMain (void * hinstDLL,
unsigned long fdwReason,
void * lpvReserved)

| hinstDLL: | | | fdwReason: | | | lpvReserved: | | | Returns: | |

Function: xmlFreeMutex

void	xmlFreeMutex ([xmlMutexPtr](libxml-threads.html#xmlMutexPtr)tok)

xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct.

| tok: | the simple mutex |

Function: xmlFreeRMutex

void	xmlFreeRMutex ([xmlRMutexPtr](libxml-threads.html#xmlRMutexPtr)tok)

xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex.

| tok: | the reentrant mutex |

Function: xmlGetGlobalState

[xmlGlobalStatePtr](libxml-globals.html#xmlGlobalStatePtr)xmlGetGlobalState	(void)

xmlGetGlobalState() is called to retrieve the global state for a thread.

| Returns: | the thread global state or NULL in case of error |

Function: xmlGetThreadId

int	xmlGetThreadId (void)

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 |

Function: xmlInitThreads

void	xmlInitThreads (void)

xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.

Function: xmlIsMainThread

int	xmlIsMainThread (void)

xmlIsMainThread() check whether the current thread is the main thread.

| Returns: | 1 if the current thread is the main thread, 0 otherwise |

Function: xmlLockLibrary

void	xmlLockLibrary (void)

xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.

Function: xmlMutexLock

void	xmlMutexLock ([xmlMutexPtr](libxml-threads.html#xmlMutexPtr)tok)

xmlMutexLock() is used to lock a libxml2 token.

| tok: | the simple mutex |

Function: xmlMutexUnlock

void	xmlMutexUnlock ([xmlMutexPtr](libxml-threads.html#xmlMutexPtr)tok)

xmlMutexUnlock() is used to unlock a libxml2 token.

| tok: | the simple mutex |

Function: xmlNewMutex

[xmlMutexPtr](libxml-threads.html#xmlMutexPtr)xmlNewMutex (void)

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 |

Function: xmlNewRMutex

[xmlRMutexPtr](libxml-threads.html#xmlRMutexPtr)xmlNewRMutex (void)

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 |

Function: xmlRMutexLock

void	xmlRMutexLock ([xmlRMutexPtr](libxml-threads.html#xmlRMutexPtr)tok)

xmlRMutexLock() is used to lock a libxml2 token_r.

| tok: | the reentrant mutex |

Function: xmlRMutexUnlock

void	xmlRMutexUnlock ([xmlRMutexPtr](libxml-threads.html#xmlRMutexPtr)tok)

xmlRMutexUnlock() is used to unlock a libxml2 token_r.

| tok: | the reentrant mutex |

Function: xmlUnlockLibrary

void	xmlUnlockLibrary (void)

xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library.

Daniel Veillard

|

|

|

|

|