(file) Return to IPCWindows.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 mday  1.1.2.3 //%////////////-*-c++-*-///////////////////////////////////////////////////////////
  2               //
  3               // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM
  4               //
  5               // Permission is hereby granted, free of charge, to any person obtaining a copy
  6               // of this software and associated documentation files (the "Software"), to 
  7               // deal in the Software without restriction, including without limitation the 
  8               // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 
  9               // sell copies of the Software, and to permit persons to whom the Software is
 10               // furnished to do so, subject to the following conditions:
 11               // 
 12               // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN 
 13               // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 14               // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 15               // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
 16               // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 17               // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
 18               // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 19               // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 20               //
 21               //==============================================================================
 22 mday  1.1.2.3 //
 23               // Author: Mike Day (mdday@us.ibm.com)
 24               //
 25               // Modified By: 
 26               //
 27               //%/////////////////////////////////////////////////////////////////////////////
 28               
 29               #include <process.h>  
 30 mday  1.1.2.5 #include <windows.h>
 31 mday  1.1.2.4 #include <stdlib.h>
 32 mday  1.1.2.3 #include <sys/types.h>
 33               #include <sys/timeb.h> 
 34               #include <errno.h>
 35               
 36 mday  1.1.2.6 int PEGASUS_EXPORT gettimeofday(struct timeval *tv, struct timezone *tz);
 37               
 38 mday  1.1.2.3 typedef CRITICAL_SECTION  PEGASUS_CRIT_TYPE;
 39               typedef HANDLE  PEGASUS_SEMAPHORE_TYPE;
 40 mday  1.1.2.5 typedef HANDLE  PEGASUS_THREAD_TYPE;
 41 mday  1.1.2.3 typedef HANDLE  PEGASUS_MUTEX_TYPE;
 42               
 43               typedef struct {
 44                     PEGASUS_SEMAPHORE_TYPE  sem;
 45                     PEGASUS_THREAD_TYPE  owner;
 46               } PEGASUS_SEM_HANDLE ;
 47               
 48               typedef struct {
 49                     HANDLE  mut;
 50                     PEGASUS_THREAD_TYPE owner;
 51               } PEGASUS_MUTEX_HANDLE ;
 52               
 53               
 54 mday  1.1.2.5 typedef void *PEGASUS_CLEANUP_HANDLE;
 55               
 56 mday  1.1.2.3 typedef DWORD PEGASUS_THREAD_RETURN;
 57               
 58 mday  1.1.2.5 #define PEGASUS_THREAD_CDECL __stdcall
 59 mday  1.1.2.3 
 60               typedef struct {
 61                     PEGASUS_THREAD_TYPE thid;
 62                     void * thatt;
 63               } PEGASUS_THREAD_HANDLE ;
 64               
 65 mday  1.1.2.4 
 66 mday  1.1.2.3 //-----------------------------------------------------------------
 67 mday  1.1.2.4 /// Conditionals to support native conditional semaphore object
 68 mday  1.1.2.3 //-----------------------------------------------------------------
 69 mday  1.1.2.4 
 70 mday  1.1.2.3 #if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)
 71               
 72 mday  1.1.2.4 // windows uses the generic conditional semaphore defined in
 73               // IPC.ccp
 74 mday  1.1.2.3 
 75 mday  1.1.2.4 #endif // platform conditional  type
 76 mday  1.1.2.3 
 77               //-----------------------------------------------------------------
 78               /// Conditionals to support native or generic atomic variables
 79               //-----------------------------------------------------------------
 80               
 81               #if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)
 82               #define PEGASUS_ATOMIC_INT_NATIVE = 1
 83               
 84               typedef LONG  PEGASUS_ATOMIC_TYPE ;
 85               
 86               #endif // platform atomic type
 87               
 88               //-----------------------------------------------------------------
 89               /// Conditionals to support native or generic read/write semaphores
 90               //-----------------------------------------------------------------
 91               
 92               #if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)
 93               
 94               // no native rw lock for windows -- use the generic one 
 95               
 96               #endif // platform read/write type
 97 mday  1.1.2.3 
 98 mday  1.1.2.7 struct timeval 
 99               {
100                     long int tv_sec;      long int tv_usec;
101               };
102               
103               struct timezone
104               {
105                     int tz_minuteswest;
106                     int tz_dsttime;
107               };
108 mike  1.1.2.2 

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2