/usr/share/doc/libxml2-devel/html
NameSizeModeActions
book1.html96350644editdlrm
home.png6540644editdlrm
index.html96350644editdlrm
left.png4590644editdlrm
libxml-c14n.html180560644editdlrm
libxml-catalog.html410210644editdlrm
libxml-chvalid.html184230644editdlrm
libxml-debugXML.html379110644editdlrm
libxml-dict.html179450644editdlrm
libxml-DOCBparser.html206250644editdlrm
libxml-encoding.html350320644editdlrm
libxml-entities.html276890644editdlrm
libxml-globals.html330880644editdlrm
libxml-hash.html473760644editdlrm
libxml-HTMLparser.html600720644editdlrm
libxml-HTMLtree.html286380644editdlrm
libxml-lib.html96350644editdlrm
libxml-list.html300730644editdlrm
libxml-nanoftp.html270900644editdlrm
libxml-nanohttp.html212240644editdlrm
libxml-parser.html1467670644editdlrm
libxml-parserInternals.html1225140644editdlrm
libxml-pattern.html236730644editdlrm
libxml-relaxng.html410020644editdlrm
libxml-SAX.html434820644editdlrm
libxml-SAX2.html444490644editdlrm
libxml-schemasInternals.html640400644editdlrm
libxml-schematron.html217320644editdlrm
libxml-threads.html171610644editdlrm
libxml-tree.html2356560644editdlrm
libxml-uri.html226780644editdlrm
libxml-valid.html1024590644editdlrm
libxml-xinclude.html197050644editdlrm
libxml-xlink.html216460644editdlrm
libxml-xmlautomata.html395740644editdlrm
libxml-xmlerror.html1097020644editdlrm
libxml-xmlexports.html78550644editdlrm
libxml-xmlIO.html639630644editdlrm
libxml-xmlmemory.html292270644editdlrm
libxml-xmlmodule.html117130644editdlrm
libxml-xmlreader.html1142270644editdlrm
libxml-xmlregexp.html457810644editdlrm
libxml-xmlsave.html192490644editdlrm
libxml-xmlschemas.html477710644editdlrm
libxml-xmlschemastypes.html493760644editdlrm
libxml-xmlstring.html391580644editdlrm
libxml-xmlunicode.html1128520644editdlrm
libxml-xmlversion.html206290644editdlrm
libxml-xmlwriter.html1174800644editdlrm
libxml-xpath.html650420644editdlrm
libxml-xpathInternals.html1432220644editdlrm
libxml-xpointer.html299750644editdlrm
right.png4720644editdlrm
up.png4060644editdlrm
Edit: /usr/share/doc/libxml2-devel/html/libxml-threads.html (17161B)
Module threads from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module threads from libxml2

API Menu
API Indexes
Related links

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

Table of Contents

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

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

tok:the simple mutex

Function: xmlFreeRMutex

void	xmlFreeRMutex			(xmlRMutexPtr tok)

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

tok:the reentrant mutex

Function: xmlGetGlobalState

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 tok)

xmlMutexLock() is used to lock a libxml2 token.

tok:the simple mutex

Function: xmlMutexUnlock

void	xmlMutexUnlock			(xmlMutexPtr tok)

xmlMutexUnlock() is used to unlock a libxml2 token.

tok:the simple mutex

Function: xmlNewMutex

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	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 tok)

xmlRMutexLock() is used to lock a libxml2 token_r.

tok:the reentrant mutex

Function: xmlRMutexUnlock

void	xmlRMutexUnlock			(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