VirtualBox

source: vbox/trunk/src/libs/libxml2-2.12.6/include/libxml/threads.h@ 105635

最後變更 在這個檔案從105635是 104106,由 vboxsync 提交於 10 月 前

libxml2-2.9.14: Applied and adjusted our libxml2 changes to 2.9.14. bugref:10640

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.7 KB
 
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
17extern "C" {
18#endif
19
20/*
21 * xmlMutex are a simple mutual exception locks.
22 */
23typedef struct _xmlMutex xmlMutex;
24typedef xmlMutex *xmlMutexPtr;
25
26/*
27 * xmlRMutex are reentrant mutual exception locks.
28 */
29typedef struct _xmlRMutex xmlRMutex;
30typedef xmlRMutex *xmlRMutexPtr;
31
32XMLPUBFUN int
33 xmlCheckThreadLocalStorage(void);
34
35XMLPUBFUN xmlMutexPtr
36 xmlNewMutex (void);
37XMLPUBFUN void
38 xmlMutexLock (xmlMutexPtr tok);
39XMLPUBFUN void
40 xmlMutexUnlock (xmlMutexPtr tok);
41XMLPUBFUN void
42 xmlFreeMutex (xmlMutexPtr tok);
43
44XMLPUBFUN xmlRMutexPtr
45 xmlNewRMutex (void);
46XMLPUBFUN void
47 xmlRMutexLock (xmlRMutexPtr tok);
48XMLPUBFUN void
49 xmlRMutexUnlock (xmlRMutexPtr tok);
50XMLPUBFUN void
51 xmlFreeRMutex (xmlRMutexPtr tok);
52
53/*
54 * Library wide APIs.
55 */
56XML_DEPRECATED
57XMLPUBFUN void
58 xmlInitThreads (void);
59XMLPUBFUN void
60 xmlLockLibrary (void);
61XMLPUBFUN void
62 xmlUnlockLibrary(void);
63XML_DEPRECATED
64XMLPUBFUN int
65 xmlGetThreadId (void);
66XML_DEPRECATED
67XMLPUBFUN int
68 xmlIsMainThread (void);
69XML_DEPRECATED
70XMLPUBFUN void
71 xmlCleanupThreads(void);
72
73/** DOC_DISABLE */
74#if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \
75 defined(LIBXML_STATIC_FOR_DLL)
76int
77xmlDllMain(void *hinstDLL, unsigned long fdwReason,
78 void *lpvReserved);
79#endif
80/** DOC_ENABLE */
81
82#ifdef __cplusplus
83}
84#endif
85
86
87#endif /* __XML_THREADS_H__ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette