VirtualBox

source: vbox/trunk/src/libs/libxml2-2.9.14/include/libxml/threads.h@ 95312

Last change on this file since 95312 was 95312, checked in by vboxsync, 2 years ago

libs/{curl,libxml2}: OSE export fixes, bugref:8515

  • Property svn:eol-style set to native
File size: 1.9 KB
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
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
32#ifdef __cplusplus
33}
34#endif
35#include <libxml/globals.h>
36#ifdef __cplusplus
37extern "C" {
38#endif
39XMLPUBFUN xmlMutexPtr XMLCALL
40 xmlNewMutex (void);
41XMLPUBFUN void XMLCALL
42 xmlMutexLock (xmlMutexPtr tok);
43XMLPUBFUN void XMLCALL
44 xmlMutexUnlock (xmlMutexPtr tok);
45XMLPUBFUN void XMLCALL
46 xmlFreeMutex (xmlMutexPtr tok);
47
48XMLPUBFUN xmlRMutexPtr XMLCALL
49 xmlNewRMutex (void);
50XMLPUBFUN void XMLCALL
51 xmlRMutexLock (xmlRMutexPtr tok);
52XMLPUBFUN void XMLCALL
53 xmlRMutexUnlock (xmlRMutexPtr tok);
54XMLPUBFUN void XMLCALL
55 xmlFreeRMutex (xmlRMutexPtr tok);
56
57/*
58 * Library wide APIs.
59 */
60XMLPUBFUN void XMLCALL
61 xmlInitThreads (void);
62XMLPUBFUN void XMLCALL
63 xmlLockLibrary (void);
64XMLPUBFUN void XMLCALL
65 xmlUnlockLibrary(void);
66XMLPUBFUN int XMLCALL
67 xmlGetThreadId (void);
68XMLPUBFUN int XMLCALL
69 xmlIsMainThread (void);
70XMLPUBFUN void XMLCALL
71 xmlCleanupThreads(void);
72XMLPUBFUN xmlGlobalStatePtr XMLCALL
73 xmlGetGlobalState(void);
74
75#ifdef HAVE_PTHREAD_H
76#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
77#if defined(LIBXML_STATIC_FOR_DLL)
78int XMLCALL
79xmlDllMain(void *hinstDLL, unsigned long fdwReason,
80 void *lpvReserved);
81#endif
82#endif
83
84#ifdef __cplusplus
85}
86#endif
87
88
89#endif /* __XML_THREADS_H__ */
Note: See TracBrowser for help on using the repository browser.

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