31 #ifndef _CPL_MULTIPROC_H_INCLUDED_ 32 #define _CPL_MULTIPROC_H_INCLUDED_ 43 #if defined(WIN32) && !defined(CPL_MULTIPROC_STUB) 44 # define CPL_MULTIPROC_WIN32 47 # undef CPL_MULTIPROC_PTHREAD 50 #if !defined(CPL_MULTIPROC_WIN32) && !defined(CPL_MULTIPROC_PTHREAD) \ 51 && !defined(CPL_MULTIPROC_STUB) && !defined(CPL_MULTIPROC_NONE) 52 # define CPL_MULTIPROC_STUB 57 typedef void (*CPLThreadFunc)(
void *);
59 void CPL_DLL *CPLLockFile(
const char *pszPath,
double dfWaitInSeconds );
60 void CPL_DLL CPLUnlockFile(
void *hLock );
62 void CPL_DLL *CPLCreateMutex(
void );
63 int CPL_DLL CPLCreateOrAcquireMutex(
void **,
double dfWaitInSeconds );
64 int CPL_DLL CPLAcquireMutex(
void *hMutex,
double dfWaitInSeconds );
65 void CPL_DLL CPLReleaseMutex(
void *hMutex );
66 void CPL_DLL CPLDestroyMutex(
void *hMutex );
67 void CPL_DLL CPLCleanupMasterMutex(
void );
69 void CPL_DLL *CPLCreateCond(
void );
70 void CPL_DLL CPLCondWait(
void *hCond,
void* hMutex );
71 void CPL_DLL CPLCondSignal(
void *hCond );
72 void CPL_DLL CPLCondBroadcast(
void *hCond );
73 void CPL_DLL CPLDestroyCond(
void *hCond );
75 GIntBig CPL_DLL CPLGetPID(
void );
76 int CPL_DLL CPLCreateThread( CPLThreadFunc pfnMain,
void *pArg );
77 void CPL_DLL* CPLCreateJoinableThread( CPLThreadFunc pfnMain,
void *pArg );
78 void CPL_DLL CPLJoinThread(
void* hJoinableThread);
79 void CPL_DLL CPLSleep(
double dfWaitInSeconds );
81 const char CPL_DLL *CPLGetThreadingModel(
void );
83 int CPL_DLL CPLGetNumCPUs(
void );
90 #define CPLMutexHolderD(x) CPLMutexHolder oHolder(x,1000.0,__FILE__,__LINE__); 94 #define CPLMutexHolderOptionalLockD(x) CPLMutexHolder oHolder(x,1000.0,__FILE__,__LINE__); 107 const char *pszFile = __FILE__,
108 int nLine = __LINE__ );
113 const char *pszFile = __FILE__,
114 int nLine = __LINE__ );
124 #define CTLS_RLBUFFERINFO 1 125 #define CTLS_WIN32_COND 2 126 #define CTLS_CSVTABLEPTR 3 127 #define CTLS_CSVDEFAULTFILENAME 4 128 #define CTLS_ERRORCONTEXT 5 129 #define CTLS_GDALDATASET_REC_PROTECT_MAP 6 130 #define CTLS_PATHBUF 7 131 #define CTLS_UNUSED3 8 132 #define CTLS_UNUSED4 9 133 #define CTLS_CPLSPRINTF 10 134 #define CTLS_RESPONSIBLEPID 11 135 #define CTLS_VERSIONINFO 12 136 #define CTLS_VERSIONINFO_LICENCE 13 137 #define CTLS_CONFIGOPTIONS 14 138 #define CTLS_FINDFILE 15 143 void CPL_DLL * CPLGetTLS(
int nIndex );
144 void CPL_DLL CPLSetTLS(
int nIndex,
void *pData,
int bFreeOnExit );
148 typedef void (*CPLTLSFreeFunc)(
void* pData );
149 void CPL_DLL CPLSetTLSWithFreeFunc(
int nIndex,
void *pData, CPLTLSFreeFunc pfnFree );
151 void CPL_DLL CPLCleanupTLS(
void );
Definition: cpl_multiproc.h:96