Ignore:
Timestamp:
Feb 13, 2003, 4:30:53 PM (23 years ago)
Author:
sandervl
Message:

Added ODIN_SetTIBSwitch function to override TIB selector switching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/wprocess.cpp

    r9750 r9800  
    1 /* $Id: wprocess.cpp,v 1.178 2003-02-04 13:40:37 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.179 2003-02-13 15:30:53 sandervl Exp $ */
    22
    33/*
     
    6666BOOL    fIsOS2Image = FALSE;            /* TRUE  -> Odin32 OS/2 application (not converted!) */
    6767                                        /* FALSE -> otherwise */
     68BOOL    fSwitchTIBSel = TRUE;           // TRUE  -> switch TIB selectors
     69                                        // FALSE -> don't
    6870BOOL    fExitProcess = FALSE;
    6971
     
    426428 TEB   *winteb;
    427429
    428    //If we're running an Odin32 OS/2 application (not converted!), then we
    429    //we don't switch FS selectors
    430     if(fIsOS2Image) {
     430    //If we're running an Odin32 OS/2 application (not converted!), then we
     431    //we don't switch FS selectors
     432    if(!fSwitchTIBSel) {
    431433        return;
    432434    }
     
    452454    //If we're running an Odin32 OS/2 application (not converted!), then we
    453455    //we don't switch FS selectors
    454     if(fIsOS2Image && !fForceSwitch) {
     456    if(!fSwitchTIBSel && !fForceSwitch) {
    455457        return GetFS();
    456458    }
     
    470472
    471473    return GetFS();
     474}
     475//******************************************************************************
     476// ODIN_SetTIBSwitch: override TIB switching
     477//
     478// Parameters:
     479//      BOOL fSwitchTIB
     480//              FALSE  -> no TIB selector switching
     481//              TRUE   -> force TIB selector switching
     482//
     483//******************************************************************************
     484void WIN32API ODIN_SetTIBSwitch(BOOL fSwitchTIB)
     485{
     486    dprintf(("ODIN_SetTIBSwitch %d", fSwitchTIB));
     487    fSwitchTIBSel = fSwitchTIB;
     488    if(fSwitchTIBSel) {
     489         SetWin32TIB();
     490    }
     491    else RestoreOS2TIB();
    472492}
    473493//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.