2 * Summary: interfaces for thread handling
3 * Description: set of generic threading related routines
4 * should work with pthreads, Windows native or TLS threads
6 * Copy: See Copyright for the status of this software.
8 * Author: Daniel Veillard
11 #ifndef __XML_THREADS_H__
12 #define __XML_THREADS_H__
14 #include <libxml/xmlversion.h>
21 * xmlMutex are a simple mutual exception locks.
23 typedef struct _xmlMutex xmlMutex
;
24 typedef xmlMutex
*xmlMutexPtr
;
27 * xmlRMutex are reentrant mutual exception locks.
29 typedef struct _xmlRMutex xmlRMutex
;
30 typedef xmlRMutex
*xmlRMutexPtr
;
35 #include <libxml/globals.h>
39 XMLPUBFUN xmlMutexPtr XMLCALL
41 XMLPUBFUN
void XMLCALL
42 xmlMutexLock (xmlMutexPtr tok
);
43 XMLPUBFUN
void XMLCALL
44 xmlMutexUnlock (xmlMutexPtr tok
);
45 XMLPUBFUN
void XMLCALL
46 xmlFreeMutex (xmlMutexPtr tok
);
48 XMLPUBFUN xmlRMutexPtr XMLCALL
50 XMLPUBFUN
void XMLCALL
51 xmlRMutexLock (xmlRMutexPtr tok
);
52 XMLPUBFUN
void XMLCALL
53 xmlRMutexUnlock (xmlRMutexPtr tok
);
54 XMLPUBFUN
void XMLCALL
55 xmlFreeRMutex (xmlRMutexPtr tok
);
60 XMLPUBFUN
void XMLCALL
61 xmlInitThreads (void);
62 XMLPUBFUN
void XMLCALL
63 xmlLockLibrary (void);
64 XMLPUBFUN
void XMLCALL
65 xmlUnlockLibrary(void);
67 xmlGetThreadId (void);
69 xmlIsMainThread (void);
70 XMLPUBFUN
void XMLCALL
71 xmlCleanupThreads(void);
72 XMLPUBFUN xmlGlobalStatePtr XMLCALL
73 xmlGetGlobalState(void);
75 #if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
76 int XMLCALL
xmlDllMain(void *hinstDLL
, unsigned long fdwReason
, void *lpvReserved
);
84 #endif /* __XML_THREADS_H__ */