blob: 9a7e362a157cd032ea5c31d3063d102f552f5aaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/**
* Summary: interfaces for thread handling
* Description: set of generic threading related routines
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_NTHREADS_H__
#define __XML_NTHREADS_H__
#include <libxml/xmlversion.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* xmlMutex are a simple mutual exception locks.
*/
typedef struct _xmlMutex xmlMutex;
typedef xmlMutex *xmlMutexPtr;
/*
* xmlRMutex are reentrant mutual exception locks.
*/
typedef struct _xmlRMutex xmlRMutex;
typedef xmlRMutex *xmlRMutexPtr;
#ifdef __cplusplus
}
#endif
#include <libxml/globals.h>
#ifdef __cplusplus
extern "C" {
#endif
struct _xmlThreadHandler
{
xmlMutexPtr (XMLCALL *newMutex) (void);
void (XMLCALL *lockMutex) (xmlMutexPtr);
void (XMLCALL *unlockMutex) (xmlMutexPtr);
void (XMLCALL *freeMutex) (xmlMutexPtr);
xmlRMutexPtr (XMLCALL *newRMutex) (void);
void (XMLCALL *lockRMutex) (xmlRMutexPtr);
void (XMLCALL *unlockRMutex) (xmlRMutexPtr);
void (XMLCALL *freeRMutex) (xmlRMutexPtr);
xmlGlobalStatePtr (XMLCALL *getGlobalState)(void);
int (XMLCALL *getThreadId) (void);
int (XMLCALL *isMainThread) (void);
};
typedef struct _xmlThreadHandler xmlThreadHandler;
typedef xmlThreadHandler* xmlThreadHandlerPtr;
#ifdef __cplusplus
}
#endif
#endif /* __XML_THREADS_H__ */
|