Line | |
---|
1 | /** |
---|
2 | * Summary: interfaces for thread handling |
---|
3 | * Description: set of generic threading related routines |
---|
4 | * should work with pthreads, Windows native or TLS threads |
---|
5 | * |
---|
6 | * Copy: See Copyright for the status of this software. |
---|
7 | * |
---|
8 | * Author: Daniel Veillard |
---|
9 | */ |
---|
10 | |
---|
11 | #ifndef __XML_THREADS_H__ |
---|
12 | #define __XML_THREADS_H__ |
---|
13 | |
---|
14 | #include <libxml/xmlversion.h> |
---|
15 | |
---|
16 | #ifdef __cplusplus |
---|
17 | extern "C" { |
---|
18 | #endif |
---|
19 | |
---|
20 | /* |
---|
21 | * xmlMutex are a simple mutual exception locks. |
---|
22 | */ |
---|
23 | typedef struct _xmlMutex xmlMutex; |
---|
24 | typedef xmlMutex *xmlMutexPtr; |
---|
25 | |
---|
26 | /* |
---|
27 | * xmlRMutex are reentrant mutual exception locks. |
---|
28 | */ |
---|
29 | typedef struct _xmlRMutex xmlRMutex; |
---|
30 | typedef xmlRMutex *xmlRMutexPtr; |
---|
31 | |
---|
32 | #ifdef __cplusplus |
---|
33 | } |
---|
34 | #endif |
---|
35 | #include <libxml/globals.h> |
---|
36 | #ifdef __cplusplus |
---|
37 | extern "C" { |
---|
38 | #endif |
---|
39 | |
---|
40 | XMLPUBFUN xmlMutexPtr XMLCALL |
---|
41 | xmlNewMutex (void); |
---|
42 | XMLPUBFUN void XMLCALL |
---|
43 | xmlMutexLock (xmlMutexPtr tok); |
---|
44 | XMLPUBFUN void XMLCALL |
---|
45 | xmlMutexUnlock (xmlMutexPtr tok); |
---|
46 | XMLPUBFUN void XMLCALL |
---|
47 | xmlFreeMutex (xmlMutexPtr tok); |
---|
48 | |
---|
49 | XMLPUBFUN xmlRMutexPtr XMLCALL |
---|
50 | xmlNewRMutex (void); |
---|
51 | XMLPUBFUN void XMLCALL |
---|
52 | xmlRMutexLock (xmlRMutexPtr tok); |
---|
53 | XMLPUBFUN void XMLCALL |
---|
54 | xmlRMutexUnlock (xmlRMutexPtr tok); |
---|
55 | XMLPUBFUN void XMLCALL |
---|
56 | xmlFreeRMutex (xmlRMutexPtr tok); |
---|
57 | |
---|
58 | /* |
---|
59 | * Library wide APIs. |
---|
60 | */ |
---|
61 | XMLPUBFUN void XMLCALL |
---|
62 | xmlInitThreads (void); |
---|
63 | XMLPUBFUN void XMLCALL |
---|
64 | xmlLockLibrary (void); |
---|
65 | XMLPUBFUN void XMLCALL |
---|
66 | xmlUnlockLibrary(void); |
---|
67 | XMLPUBFUN int XMLCALL |
---|
68 | xmlGetThreadId (void); |
---|
69 | XMLPUBFUN int XMLCALL |
---|
70 | xmlIsMainThread (void); |
---|
71 | XMLPUBFUN void XMLCALL |
---|
72 | xmlCleanupThreads(void); |
---|
73 | XMLPUBFUN xmlGlobalStatePtr XMLCALL |
---|
74 | xmlGetGlobalState(void); |
---|
75 | |
---|
76 | #ifdef __cplusplus |
---|
77 | } |
---|
78 | #endif |
---|
79 | |
---|
80 | |
---|
81 | #endif /* __XML_THREADS_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.