2 * threads.c: set of generic threading related routines
4 * See Copyright for the status of this software.
9 #ifndef __XML_THREADS_H__
10 #define __XML_THREADS_H__
17 * xmlMutex are a simple mutual exception locks.
19 typedef struct _xmlMutex xmlMutex;
20 typedef xmlMutex *xmlMutexPtr;
23 * xmlRMutex are reentrant mutual exception locks.
25 typedef struct _xmlRMutex xmlRMutex;
26 typedef xmlRMutex *xmlRMutexPtr;
31 #include <libxml/globals.h>
36 xmlMutexPtr xmlNewMutex (void);
37 void xmlMutexLock (xmlMutexPtr tok);
38 void xmlMutexUnlock (xmlMutexPtr tok);
39 void xmlFreeMutex (xmlMutexPtr tok);
41 xmlRMutexPtr xmlNewRMutex (void);
42 void xmlRMutexLock (xmlRMutexPtr tok);
43 void xmlRMutexUnlock (xmlRMutexPtr tok);
44 void xmlFreeRMutex (xmlRMutexPtr tok);
49 void xmlInitThreads (void);
50 void xmlLockLibrary (void);
51 void xmlUnlockLibrary(void);
52 int xmlGetThreadId (void);
53 int xmlIsMainThread (void);
54 void xmlCleanupThreads(void);
55 xmlGlobalStatePtr xmlGetGlobalState(void);
62 #endif /* __XML_THREADS_H__ */