Home | History | Annotate | Download | only in libxmlrpg
      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 (a] datasphere.ch>, DATASPHERE S.A.
      8 
      9       /if not defined(XML_THREADS_H__)
     10       /define XML_THREADS_H__
     11 
     12       /include "libxmlrpg/xmlversion"
     13 
     14       * xmlMutex are a simple mutual exception locks.
     15 
     16      d xmlMutexPtr     s               *   based(######typedef######)
     17 
     18       * xmlRMutex are reentrant mutual exception locks.
     19 
     20      d xmlRMutexPtr    s               *   based(######typedef######)
     21 
     22       /include "libxmlrpg/globals"
     23 
     24      d xmlNewMutex     pr                  extproc('xmlNewMutex')
     25      d                                     like(xmlMutexPtr)
     26 
     27      d xmlMutexLock    pr                  extproc('xmlMutexLock')
     28      d  tok                                value like(xmlMutexPtr)
     29 
     30      d xmlMutexUnlock  pr                  extproc('xmlMutexUnlock')
     31      d  tok                                value like(xmlMutexPtr)
     32 
     33      d xmlFreeMutex    pr                  extproc('xmlFreeMutex')
     34      d  tok                                value like(xmlMutexPtr)
     35 
     36      d xmlNewRMutex    pr                  extproc('xmlNewRMutex')
     37      d                                     like(xmlRMutexPtr)
     38 
     39      d xmlRMutexLock   pr                  extproc('xmlRMutexLock')
     40      d  tok                                value like(xmlRMutexPtr)
     41 
     42      d xmlRMutexUnlock...
     43      d                 pr                  extproc('xmlRMutexUnlock')
     44      d  tok                                value like(xmlRMutexPtr)
     45 
     46      d xmlFreeRMutex   pr                  extproc('xmlFreeRMutex')
     47      d  tok                                value like(xmlRMutexPtr)
     48 
     49       * Library wide APIs.
     50 
     51      d xmlInitThreads  pr                  extproc('xmlInitThreads')
     52 
     53      d xmlLockLibrary  pr                  extproc('xmlLockLibrary')
     54 
     55      d xmlUnlockLibrary...
     56      d                 pr                  extproc('xmlUnlockLibrary')
     57 
     58      d xmlGetThreadId  pr            10i 0 extproc('xmlGetThreadId')
     59 
     60      d xmlIsMainThread...
     61      d                 pr            10i 0 extproc('xmlIsMainThread')
     62 
     63      d xmlCleanupThreads...
     64      d                 pr                  extproc('xmlCleanupThreads')
     65 
     66      d xmlGetGlobalState...
     67      d                 pr                  extproc('xmlGetGlobalState')
     68      d                                     like(xmlGlobalStatePtr)
     69 
     70       /endif                                                                    XML_THREADS_H__
     71