Changeset 360 for trunk/hlpmgr/sharedmemory.c
- Timestamp:
- Jun 18, 2009, 8:55:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hlpmgr/sharedmemory.c
r26 r360 17 17 char FullName[ 260 ]; 18 18 19 pSharedMemory -> FFirst = TRUE; 19 pSharedMemory -> FFirst = TRUE; 20 20 21 21 strcpy( FullName, "\\SHAREMEM\\" ); … … 31 31 { 32 32 LogEvent( " Unable to create shared mem: %d", rc ); 33 if ( rc == ERROR_ALREADY_EXISTS ) 33 if ( rc == ERROR_ALREADY_EXISTS ) 34 34 { 35 35 LogEvent( " - Already exists, open" ); … … 55 55 while( TRUE ) 56 56 { 57 rc = DosOpenMutexSem( pszName, 58 phmtx ); 57 rc = DosOpenMutexSem( pszName, 58 phmtx ); 59 59 60 60 if ( rc != ERROR_SEM_NOT_FOUND ) … … 62 62 break; 63 63 64 rc = DosCreateMutexSem( pszName, 64 rc = DosCreateMutexSem( pszName, 65 65 phmtx, 66 0, 67 FALSE ); 66 0, 67 FALSE ); 68 68 if ( rc != ERROR_DUPLICATE_NAME ) 69 69 // ok, or some error … … 91 91 ULONG Size, 92 92 ULONG ReserveSize, // size to reserve at start of memory 93 TSubAllocatedSharedMemory* pSharedMemory ) 93 TSubAllocatedSharedMemory* pSharedMemory ) 94 94 { 95 95 APIRET rc; … … 113 113 LogEvent( " semaphore name: %s", SemaphoreName ); 114 114 115 rc = OpenOrCreateMutex( SemaphoreName, 115 rc = OpenOrCreateMutex( SemaphoreName, 116 116 & StartupSemaphore ); 117 117 if ( rc != 0 ) … … 151 151 } 152 152 153 pSharedMemory -> FAllocationArea = 153 pSharedMemory -> FAllocationArea = 154 154 (PBYTE) pSharedMemory -> FMem.FPointer 155 155 + ActualReserveSize; … … 207 207 void** p ) 208 208 { 209 APIRET rc; 209 APIRET rc; 210 210 PULONG pSize; 211 211 ULONG Size; … … 221 221 222 222 *p = NULL; 223 } 223 } 224 224 225 225 void ReleaseSubAllocatedSharedMemory( TSubAllocatedSharedMemory* pSharedMemory ) … … 232 232 ReleaseSharedMemory( & pSharedMemory -> FMem ); 233 233 } 234 234
Note:
See TracChangeset
for help on using the changeset viewer.