  
    
    
    
    
    
    
    
  
  
    
      
        
          
libxml2-schematron.html            
Prev          
        
        
          
general.html            
Up          
        
        
          
index.html            
Home          
        
        
          
libxml2-tree.html            
Next          
        
        
libxml2 Reference Manual      
    
    
      
threads    
    
threads - interfaces for thread handling
    
set of generic threading related routines should work with pthreads, Windows native or TLS threads 
    
Author(s): Daniel Veillard 
    
      
Synopsis
      
typedef struct _xmlMutex #xmlMutexxmlMutex ;
typedef struct _xmlRMutex 
#xmlRMutexxmlRMutex ;
typedef 
libxml2-threads.html#xmlRMutexxmlRMutex  * #xmlRMutexPtrxmlRMutexPtr ;
typedef 
libxml2-threads.html#xmlMutexxmlMutex  * #xmlMutexPtrxmlMutexPtr ;
void	
#xmlFreeRMutexxmlFreeRMutex 			( libxml2-threads.html#xmlRMutexPtrxmlRMutexPtr  tok);
int	
#xmlGetThreadIdxmlGetThreadId 			(void);
void	
#xmlMutexUnlockxmlMutexUnlock 			( libxml2-threads.html#xmlMutexPtrxmlMutexPtr  tok);
void	
#xmlCleanupThreadsxmlCleanupThreads 		(void);
void	
#xmlLockLibraryxmlLockLibrary 			(void);
libxml2-threads.html#xmlRMutexPtrxmlRMutexPtr 	#xmlNewRMutexxmlNewRMutex 		(void);
void	
#xmlMutexLockxmlMutexLock 			( libxml2-threads.html#xmlMutexPtrxmlMutexPtr  tok);
int	
#xmlIsMainThreadxmlIsMainThread 			(void);
void	
#xmlRMutexUnlockxmlRMutexUnlock 			( libxml2-threads.html#xmlRMutexPtrxmlRMutexPtr  tok);
libxml2-globals.html#xmlGlobalStatePtrxmlGlobalStatePtr 	#xmlGetGlobalStatexmlGetGlobalState 	(void);
libxml2-threads.html#xmlMutexPtrxmlMutexPtr 	#xmlNewMutexxmlNewMutex 		(void);
void	
#xmlRMutexLockxmlRMutexLock 			( libxml2-threads.html#xmlRMutexPtrxmlRMutexPtr  tok);
void	
#xmlInitThreadsxmlInitThreads 			(void);
void	
#xmlUnlockLibraryxmlUnlockLibrary 		(void);
void	
#xmlFreeMutexxmlFreeMutex 			( libxml2-threads.html#xmlMutexPtrxmlMutexPtr  tok);
    
    
      
Description
    
    
      
Details
      
        
Structure xmlMutex
struct _xmlMutex {
The content of this structure is not made public by the API.
} xmlMutex;
        
        
Typedef xmlMutexPtr
libxml2-threads.html#xmlMutexxmlMutex  * xmlMutexPtr;
        
        
Structure xmlRMutex
struct _xmlRMutex {
The content of this structure is not made public by the API.
} xmlRMutex;
        
        
Typedef xmlRMutexPtr
libxml2-threads.html#xmlRMutexxmlRMutex  * xmlRMutexPtr;
        
        
xmlCleanupThreads ()
void	xmlCleanupThreads		(void)xmlCleanupThreads() is used to to cleanup all the thread related data of the libxml2 library once processing has ended.
        
        
xmlFreeMutex ()
void	xmlFreeMutex			( libxml2-threads.html#xmlMutexPtrxmlMutexPtr  tok)xmlFreeMutex() is used to reclaim resources associated with a libxml2 token struct.
tok: the simple mutex         
        
xmlFreeRMutex ()
void	xmlFreeRMutex			( libxml2-threads.html#xmlRMutexPtrxmlRMutexPtr  tok)xmlRFreeMutex() is used to reclaim resources associated with a reentrant mutex.
tok: the reentrant mutex         
        
xmlGetGlobalState ()
libxml2-globals.html#xmlGlobalStatePtrxmlGlobalStatePtr 	xmlGetGlobalState	(void)xmlGetGlobalState() is called to retrieve the global state for a thread.
Returns: the thread global state or NULL in case of error         
        
xmlGetThreadId ()
int	xmlGetThreadId			(void)xmlGetThreadId() find the current thread ID number
Returns: the current thread ID number         
        
xmlInitThreads ()
void	xmlInitThreads			(void)xmlInitThreads() is used to to initialize all the thread related data of the libxml2 library.
        
        
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         
        
xmlLockLibrary ()
void	xmlLockLibrary			(void)xmlLockLibrary() is used to take out a re-entrant lock on the libxml2 library.
        
        
xmlMutexLock ()
void	xmlMutexLock			( libxml2-threads.html#xmlMutexPtrxmlMutexPtr  tok)xmlMutexLock() is used to lock a libxml2 token.
tok: the simple mutex         
        
xmlMutexUnlock ()
void	xmlMutexUnlock			( libxml2-threads.html#xmlMutexPtrxmlMutexPtr  tok)xmlMutexUnlock() is used to unlock a libxml2 token.
tok: the simple mutex         
        
xmlNewMutex ()
libxml2-threads.html#xmlMutexPtrxmlMutexPtr 	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         
        
xmlNewRMutex ()
libxml2-threads.html#xmlRMutexPtrxmlRMutexPtr 	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         
        
xmlRMutexLock ()
void	xmlRMutexLock			( libxml2-threads.html#xmlRMutexPtrxmlRMutexPtr  tok)xmlRMutexLock() is used to lock a libxml2 token_r.
tok: the reentrant mutex         
        
xmlRMutexUnlock ()
void	xmlRMutexUnlock			( libxml2-threads.html#xmlRMutexPtrxmlRMutexPtr  tok)xmlRMutexUnlock() is used to unlock a libxml2 token_r.
tok: the reentrant mutex         
        
xmlUnlockLibrary ()
void	xmlUnlockLibrary		(void)xmlUnlockLibrary() is used to release a re-entrant lock on the libxml2 library.
        
      
    
  
