Changeset 3206 for trunk/src/kernel32/mmap.cpp
- Timestamp:
- Mar 23, 2000, 8:23:48 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/mmap.cpp
r3059 r3206 1 /* $Id: mmap.cpp,v 1.3 6 2000-03-09 19:03:19sandervl Exp $ */1 /* $Id: mmap.cpp,v 1.37 2000-03-23 19:23:47 sandervl Exp $ */ 2 2 3 3 /* … … 35 35 #include "dbglocal.h" 36 36 37 //NOTE: This must be in the local data segment -> if a shared semaphore was 38 // created by a different process, the handle returned by DosOpenMutexSem 39 // will be returned in hGlobalMapMutex 40 HMTX hGlobalMapMutex = 0; 41 37 42 //Global DLL Data 38 43 #pragma data_seg(_GLOBALDATA) 39 44 Win32MemMap *Win32MemMap::memmaps = NULL; 40 VMutex globalmapMutex(VMUTEX_SHARED );45 VMutex globalmapMutex(VMUTEX_SHARED, &hGlobalMapMutex); 41 46 #pragma data_seg() 42 47 VMutex globalviewMutex; … … 49 54 : nrMappings(0), pMapping(NULL), mMapAccess(0), referenced(0), image(0) 50 55 { 51 globalmapMutex.enter( );56 globalmapMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalMapMutex); 52 57 next = memmaps; 53 58 memmaps = this; 54 globalmapMutex.leave( );59 globalmapMutex.leave(&hGlobalMapMutex); 55 60 56 61 hMemFile = hfile; … … 72 77 : nrMappings(0), pMapping(NULL), mMapAccess(0), referenced(0) 73 78 { 74 globalmapMutex.enter( );79 globalmapMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalMapMutex); 75 80 next = memmaps; 76 81 memmaps = this; 77 globalmapMutex.leave( );82 globalmapMutex.leave(&hGlobalMapMutex); 78 83 79 84 hMemFile = -1; … … 148 153 mapMutex.leave(); 149 154 150 globalmapMutex.enter( );155 globalmapMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalMapMutex); 151 156 Win32MemMap *map = memmaps; 152 157 … … 165 170 else dprintf(("Win32MemMap::~Win32MemMap: map not found!! (%x)", this)); 166 171 } 167 globalmapMutex.leave( );172 globalmapMutex.leave(&hGlobalMapMutex); 168 173 } 169 174 //****************************************************************************** … … 467 472 return NULL; 468 473 469 globalmapMutex.enter( );474 globalmapMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalMapMutex); 470 475 Win32MemMap *map = memmaps; 471 476 … … 477 482 } 478 483 } 479 globalmapMutex.leave( );484 globalmapMutex.leave(&hGlobalMapMutex); 480 485 if(!map) dprintf(("Win32MemMap::findMap: couldn't find map %s", lpszName)); 481 486 return map; … … 485 490 Win32MemMap *Win32MemMap::findMap(ULONG address) 486 491 { 487 globalmapMutex.enter( );492 globalmapMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalMapMutex); 488 493 Win32MemMap *map = memmaps; 489 494 … … 498 503 } 499 504 } 500 globalmapMutex.leave( );505 globalmapMutex.leave(&hGlobalMapMutex); 501 506 return map; 502 507 }
Note:
See TracChangeset
for help on using the changeset viewer.