Blame doc/html/libxml-threads.html

Packit 423ecb
Packit 423ecb
Packit 423ecb
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
Packit 423ecb
TD {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
Packit 423ecb
H1 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
H2 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
H3 {font-family: Verdana,Arial,Helvetica}
Packit 423ecb
A:link, A:visited, A:active { text-decoration: underline }
Packit 423ecb
</style><style type="text/css">
Packit 423ecb
      div.deprecated pre.programlisting {border-style: double;border-color:red}
Packit 423ecb
      pre.programlisting {border-style: double;background: #EECFA1}
Packit 423ecb
    </style><title>Module threads from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module threads from libxml2

<center>API Menu</center>
<form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form>
<center>API Indexes</center>
<center>Related links</center>

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

Table of Contents

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

Description

Packit 423ecb

Structure xmlMutex

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

Structure xmlRMutex

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

Function: xmlCleanupThreads

void	xmlCleanupThreads		(void)
Packit 423ecb

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 !

Packit 423ecb

Function: xmlDllMain

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

Packit 423ecb
<tt>hinstDLL</tt>:
<tt>fdwReason</tt>:
<tt>lpvReserved</tt>:
<tt>Returns</tt>:

Function: xmlFreeMutex

void	xmlFreeMutex			(xmlMutexPtr tok)
Packit 423ecb

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

Packit 423ecb
<tt>tok</tt>:the simple mutex

Function: xmlFreeRMutex

void	xmlFreeRMutex			(xmlRMutexPtr tok)
Packit 423ecb

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

Packit 423ecb
<tt>tok</tt>:the reentrant mutex

Function: xmlGetGlobalState

xmlGlobalStatePtr	xmlGetGlobalState	(void)
Packit 423ecb

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

Packit 423ecb
<tt>Returns</tt>:the thread global state or NULL in case of error

Function: xmlGetThreadId

int	xmlGetThreadId			(void)
Packit 423ecb

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

Packit 423ecb
<tt>Returns</tt>:the current thread ID number

Function: xmlInitThreads

void	xmlInitThreads			(void)
Packit 423ecb

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

Packit 423ecb

Function: xmlIsMainThread

int	xmlIsMainThread			(void)
Packit 423ecb

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

Packit 423ecb
<tt>Returns</tt>:1 if the current thread is the main thread, 0 otherwise

Function: xmlLockLibrary

void	xmlLockLibrary			(void)
Packit 423ecb

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

Packit 423ecb

Function: xmlMutexLock

void	xmlMutexLock			(xmlMutexPtr tok)
Packit 423ecb

xmlMutexLock() is used to lock a libxml2 token.

Packit 423ecb
<tt>tok</tt>:the simple mutex

Function: xmlMutexUnlock

void	xmlMutexUnlock			(xmlMutexPtr tok)
Packit 423ecb

xmlMutexUnlock() is used to unlock a libxml2 token.

Packit 423ecb
<tt>tok</tt>:the simple mutex

Function: xmlNewMutex

xmlMutexPtr	xmlNewMutex		(void)
Packit 423ecb

xmlNewMutex() is used to allocate a libxml2 token struct for use in synchronizing access to data.

Packit 423ecb
<tt>Returns</tt>:a new simple mutex pointer or NULL in case of error

Function: xmlNewRMutex

xmlRMutexPtr	xmlNewRMutex		(void)
Packit 423ecb

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.

Packit 423ecb
<tt>Returns</tt>:the new reentrant mutex pointer or NULL in case of error

Function: xmlRMutexLock

void	xmlRMutexLock			(xmlRMutexPtr tok)
Packit 423ecb

xmlRMutexLock() is used to lock a libxml2 token_r.

Packit 423ecb
<tt>tok</tt>:the reentrant mutex

Function: xmlRMutexUnlock

void	xmlRMutexUnlock			(xmlRMutexPtr tok)
Packit 423ecb

xmlRMutexUnlock() is used to unlock a libxml2 token_r.

Packit 423ecb
<tt>tok</tt>:the reentrant mutex

Function: xmlUnlockLibrary

void	xmlUnlockLibrary		(void)
Packit 423ecb

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

Packit 423ecb

Daniel Veillard

</body></html>