Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

cpl_multiproc.h

00001 /**********************************************************************
00002  * $Id: cpl_multiproc_h-source.html,v 1.3 2002/12/21 19:13:12 warmerda Exp $
00003  *
00004  * Project:  CPL - Common Portability Library
00005  * Purpose:  CPL Multi-Threading, and process handling portability functions.
00006  * Author:   Frank Warmerdam, warmerdam@pobox.com
00007  *
00008  **********************************************************************
00009  * Copyright (c) 2002, Frank Warmerdam
00010  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  * 
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  * 
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00022  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
00027  * DEALINGS IN THE SOFTWARE.
00028  **********************************************************************
00029  *
00030  * $Log: cpl_multiproc_h-source.html,v $
00030  * Revision 1.3  2002/12/21 19:13:12  warmerda
00030  * updated
00030  *
00031  * Revision 1.2  2002/05/24 04:09:24  warmerda
00032  * fixed CPL_DLL declarations
00033  *
00034  * Revision 1.1  2002/05/24 04:01:01  warmerda
00035  * New
00036  *
00037  **********************************************************************/
00038 
00039 #ifndef _CPL_MULTIPROC_H_INCLUDED_
00040 #define _CPL_MULTIPROC_H_INCLUDED_
00041 
00042 #include "cpl_port.h"
00043 
00044 // There are three primary implementations of the multi-process support
00045 // controlled by one of CPL_MULTIPROC_WIN32, CPL_MULTIPROC_PTHREAD or
00046 // CPL_MULTIPROC_STUB being defined.  If none are defined, the stub
00047 // implementation will be used.
00048 
00049 #if defined(WIN32) && !defined(CPL_MULTIPROC_STUB)
00050 #  define CPL_MULTIPROC_WIN32
00051 #endif
00052 
00053 #if !defined(CPL_MULTIPROC_WIN32) && !defined(CPL_MULTIPROC_PTHREAD) \
00054  && !defined(CPL_MULTIPROC_STUB)
00055 #  define CPL_MULTIPROC_STUB
00056 #endif
00057 
00058 CPL_C_START
00059 
00060 void CPL_DLL *CPLLockFile( const char *pszPath, double dfWaitInSeconds );
00061 void  CPL_DLL CPLUnlockFile( void *hLock );
00062 
00063 void CPL_DLL *CPLCreateMutex();
00064 int   CPL_DLL CPLAcquireMutex( void *hMutex, double dfWaitInSeconds );
00065 void  CPL_DLL CPLReleaseMutex( void *hMutex );
00066 void  CPL_DLL CPLDestroyMutex( void *hMutex );
00067 
00068 int   CPL_DLL CPLGetPID();
00069 int   CPL_DLL CPLCreateThread( void (*pfnMain)(void *), void *pArg );
00070 void  CPL_DLL CPLSleep( double dfWaitInSeconds );
00071 
00072 CPL_C_END
00073 
00074 #endif /* _CPL_MULTIPROC_H_INCLUDED_ */

Generated at Sat Dec 21 14:01:57 2002 for GDAL by doxygen1.2.3-20001105 written by Dimitri van Heesch, © 1997-2000