aboutsummaryrefslogtreecommitdiff
path: root/libxml2-2.9.10/os400/libxmlrpg/threads.rpgle
blob: 124798bbc74de0b8dc1fbc0cbf46edec2eb2897f (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
67
68
69
70
71
72
73
      * Summary: interfaces for thread handling
      * Description: set of generic threading related routines
      *              should work with pthreads, Windows native or TLS threads
      *
      * Copy: See Copyright for the status of this software.
      *
      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.

      /if not defined(XML_THREADS_H__)
      /define XML_THREADS_H__

      /include "libxmlrpg/xmlversion"
      /include "libxmlrpg/xmlTypesC"

      * xmlMutex are a simple mutual exception locks.

     d xmlMutexPtr     s               *   based(######typedef######)

      * xmlRMutex are reentrant mutual exception locks.

     d xmlRMutexPtr    s               *   based(######typedef######)

      /include "libxmlrpg/globals"

     d xmlNewMutex     pr                  extproc('xmlNewMutex')
     d                                     like(xmlMutexPtr)

     d xmlMutexLock    pr                  extproc('xmlMutexLock')
     d  tok                                value like(xmlMutexPtr)

     d xmlMutexUnlock  pr                  extproc('xmlMutexUnlock')
     d  tok                                value like(xmlMutexPtr)

     d xmlFreeMutex    pr                  extproc('xmlFreeMutex')
     d  tok                                value like(xmlMutexPtr)

     d xmlNewRMutex    pr                  extproc('xmlNewRMutex')
     d                                     like(xmlRMutexPtr)

     d xmlRMutexLock   pr                  extproc('xmlRMutexLock')
     d  tok                                value like(xmlRMutexPtr)

     d xmlRMutexUnlock...
     d                 pr                  extproc('xmlRMutexUnlock')
     d  tok                                value like(xmlRMutexPtr)

     d xmlFreeRMutex   pr                  extproc('xmlFreeRMutex')
     d  tok                                value like(xmlRMutexPtr)

      * Library wide APIs.

     d xmlInitThreads  pr                  extproc('xmlInitThreads')

     d xmlLockLibrary  pr                  extproc('xmlLockLibrary')

     d xmlUnlockLibrary...
     d                 pr                  extproc('xmlUnlockLibrary')

     d xmlGetThreadId  pr                  extproc('xmlGetThreadId')
     d                                     like(xmlCint)

     d xmlIsMainThread...
     d                 pr                  extproc('xmlIsMainThread')
     d                                     like(xmlCint)

     d xmlCleanupThreads...
     d                 pr                  extproc('xmlCleanupThreads')

     d xmlGetGlobalState...
     d                 pr                  extproc('xmlGetGlobalState')
     d                                     like(xmlGlobalStatePtr)

      /endif                                                                    XML_THREADS_H__