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

memory map functions for dib section code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.