Changeset 10377 for trunk/src


Ignore:
Timestamp:
Jan 11, 2004, 12:57:53 PM (22 years ago)
Author:
sandervl
Message:

memory map functions for dib section code

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.DEF

    r10305 r10377  
    1 ; $Id: KERNEL32.DEF,v 1.158 2003-10-28 19:19:21 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.159 2004-01-11 11:57:50 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
     
    10861086    _UnregisterLxDll@4                                            @1239
    10871087    _RegisterDummyExe@4                                           @1249
     1088    _IsDummyExeLoaded@0                                           @1250 NONAME
    10881089
    10891090;VMutex
     
    12441245
    12451246    _OSLibWinCreateObject@32                                      @3111 NONAME
     1247
     1248    _MMAP_RegisterMemoryRange@16                                  @3112 NONAME
     1249    _MMAP_UnregisterMemoryRange@4                                 @3113 NONAME
     1250
     1251    _ODIN_SetExceptionHandler@4                                   @3114 NONAME
     1252    _ODIN_UnsetExceptionHandler@4                                 @3115 NONAME
    12461253
    12471254; Char functions (forwarders from user32)
  • trunk/src/kernel32/exceptions.cpp

    r9910 r10377  
    1 /* $Id: exceptions.cpp,v 1.72 2003-03-06 10:22:26 sandervl Exp $ */
     1/* $Id: exceptions.cpp,v 1.73 2004-01-11 11:57:52 sandervl Exp $ */
    22
    33/*
     
    12431243        map = Win32MemMapView::findMapByView(pERepRec->ExceptionInfo[1], &offset, accessflag);
    12441244        if(map == NULL) {
     1245            Win32MemMapNotify *map;
     1246
     1247            map = Win32MemMapNotify::findMapByView(pERepRec->ExceptionInfo[1], &offset, accessflag);
     1248            if(!map)
     1249                goto continueFail;
     1250
     1251            BOOL ret = map->notify(pERepRec->ExceptionInfo[1], offset, fWriteAccess);
     1252            if(ret == TRUE) goto continueexecution;
    12451253            goto continueFail;
    12461254        }
     
    14511459}
    14521460//*****************************************************************************
     1461// Set exception handler if our handler has not yet been registered
     1462//*****************************************************************************
     1463void WIN32API ODIN_SetExceptionHandler(void *pExceptionRegRec)
     1464{
     1465  BOOL   fFound = FALSE;
     1466  USHORT sel = RestoreOS2FS();
     1467  PEXCEPTIONREGISTRATIONRECORD pExceptRec = (PEXCEPTIONREGISTRATIONRECORD)QueryExceptionChain();
     1468
     1469  while(pExceptRec != 0 && (ULONG)pExceptRec != -1)
     1470  {
     1471        if(pExceptRec->ExceptionHandler == OS2ExceptionHandler)
     1472        {
     1473            fFound = TRUE;
     1474            break;
     1475        }
     1476        pExceptRec = pExceptRec->prev_structure;
     1477  }
     1478  if(!fFound)
     1479  {
     1480      OS2SetExceptionHandler(pExceptionRegRec);
     1481  }
     1482  SetFS(sel);
     1483}
     1484//*****************************************************************************
     1485// Remove exception handler if it was registered previously
     1486//
     1487//*****************************************************************************
     1488void WIN32API ODIN_UnsetExceptionHandler(void *pExceptionRegRec)
     1489{
     1490  USHORT sel = RestoreOS2FS();
     1491  PEXCEPTIONREGISTRATIONRECORD pExceptRec = (PEXCEPTIONREGISTRATIONRECORD)QueryExceptionChain();
     1492
     1493  if(pExceptRec == (PEXCEPTIONREGISTRATIONRECORD)pExceptionRegRec) {
     1494      OS2UnsetExceptionHandler(pExceptionRegRec);
     1495  }
     1496  SetFS(sel);
     1497}
     1498//*****************************************************************************
    14531499//*****************************************************************************
    14541500#ifdef DEBUG
  • trunk/src/kernel32/kernel32dbg.def

    r10305 r10377  
    1 ; $Id: kernel32dbg.def,v 1.33 2003-10-28 19:19:21 sandervl Exp $
     1; $Id: kernel32dbg.def,v 1.34 2004-01-11 11:57:52 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
     
    10861086    _UnregisterLxDll@4                                            @1239
    10871087    _RegisterDummyExe@4                                           @1249
     1088    _IsDummyExeLoaded@0                                           @1250 NONAME
    10881089
    10891090;VMutex
     
    12441245
    12451246    _OSLibWinCreateObject@32                                      @3111 NONAME
     1247
     1248    _MMAP_RegisterMemoryRange@16                                  @3112 NONAME
     1249    _MMAP_UnregisterMemoryRange@4                                 @3113 NONAME
     1250
     1251    _ODIN_SetExceptionHandler@4                                   @3114 NONAME
     1252    _ODIN_UnsetExceptionHandler@4                                 @3115 NONAME
    12461253
    12471254; Char functions (forwarders from user32)
  • trunk/src/kernel32/mmap.cpp

    r10073 r10377  
    1 /* $Id: mmap.cpp,v 1.66 2003-05-06 12:06:10 sandervl Exp $ */
     1/* $Id: mmap.cpp,v 1.67 2004-01-11 11:57:53 sandervl Exp $ */
    22
    33/*
     
    7373//******************************************************************************
    7474//******************************************************************************
     75void FinalizeMemMaps()
     76{
     77    DosDeleteCriticalSection(&globalmapcritsect);
     78}
     79//******************************************************************************
     80//******************************************************************************
    7581Win32MemMap::Win32MemMap(HANDLE hfile, ULONG size, ULONG fdwProtect, LPSTR lpszName)
    7682               : nrMappings(0), pMapping(NULL), mMapAccess(0), referenced(0),
Note: See TracChangeset for help on using the changeset viewer.