• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1      * Summary: interfaces for thread handling
2      * Description: set of generic threading related routines
3      *              should work with pthreads, Windows native or TLS threads
4      *
5      * Copy: See Copyright for the status of this software.
6      *
7      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
8
9      /if not defined(XML_THREADS_H__)
10      /define XML_THREADS_H__
11
12      /include "libxmlrpg/xmlversion"
13      /include "libxmlrpg/xmlTypesC"
14
15      * xmlMutex are a simple mutual exception locks.
16
17     d xmlMutexPtr     s               *   based(######typedef######)
18
19      * xmlRMutex are reentrant mutual exception locks.
20
21     d xmlRMutexPtr    s               *   based(######typedef######)
22
23      /include "libxmlrpg/globals"
24
25     d xmlNewMutex     pr                  extproc('xmlNewMutex')
26     d                                     like(xmlMutexPtr)
27
28     d xmlMutexLock    pr                  extproc('xmlMutexLock')
29     d  tok                                value like(xmlMutexPtr)
30
31     d xmlMutexUnlock  pr                  extproc('xmlMutexUnlock')
32     d  tok                                value like(xmlMutexPtr)
33
34     d xmlFreeMutex    pr                  extproc('xmlFreeMutex')
35     d  tok                                value like(xmlMutexPtr)
36
37     d xmlNewRMutex    pr                  extproc('xmlNewRMutex')
38     d                                     like(xmlRMutexPtr)
39
40     d xmlRMutexLock   pr                  extproc('xmlRMutexLock')
41     d  tok                                value like(xmlRMutexPtr)
42
43     d xmlRMutexUnlock...
44     d                 pr                  extproc('xmlRMutexUnlock')
45     d  tok                                value like(xmlRMutexPtr)
46
47     d xmlFreeRMutex   pr                  extproc('xmlFreeRMutex')
48     d  tok                                value like(xmlRMutexPtr)
49
50      * Library wide APIs.
51
52     d xmlInitThreads  pr                  extproc('xmlInitThreads')
53
54     d xmlLockLibrary  pr                  extproc('xmlLockLibrary')
55
56     d xmlUnlockLibrary...
57     d                 pr                  extproc('xmlUnlockLibrary')
58
59     d xmlGetThreadId  pr                  extproc('xmlGetThreadId')
60     d                                     like(xmlCint)
61
62     d xmlIsMainThread...
63     d                 pr                  extproc('xmlIsMainThread')
64     d                                     like(xmlCint)
65
66     d xmlCleanupThreads...
67     d                 pr                  extproc('xmlCleanupThreads')
68
69     d xmlGetGlobalState...
70     d                 pr                  extproc('xmlGetGlobalState')
71     d                                     like(xmlGlobalStatePtr)
72
73      /endif                                                                    XML_THREADS_H__
74