Changeset 9800 for trunk/src


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

Added ODIN_SetTIBSwitch function to override TIB selector switching

Location:
trunk/src/kernel32
Files:
5 edited

Legend:

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

    r9708 r9800  
    1 ; $Id: KERNEL32.DEF,v 1.149 2003-01-22 17:06:18 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.150 2003-02-13 15:30:51 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
     
    11971197    _RegisterCustomDriver@36                                      @2015 NONAME
    11981198
    1199     strcmpiW                                                      @2020
     1199    strcmpiW                                                      @2020 NONAME
    12001200    strstrW                                                       @2021 NONAME
    12011201    strncmpiW                                                     @2022 NONAME
     
    12131213; override export
    12141214    _ODIN_SetProcAddress@12                                       @2101 NONAME
     1215
     1216; override TIB switching
     1217    _ODIN_SetTIBSwitch@4                                          @2102 NONAME                                           
    12151218
    12161219    GetDisplayCodepage                                            @3000 NONAME
  • trunk/src/kernel32/dbglog.cpp

    r9708 r9800  
    1 /* $Id: dbglog.cpp,v 1.5 2003-01-22 17:06:18 sandervl Exp $ */
     1/* $Id: dbglog.cpp,v 1.6 2003-02-13 15:30:52 sandervl Exp $ */
    22
    33/*
     
    309309#ifdef WIN32_IP_LOGGING
    310310        char *logserver = getenv("WIN32LOG_IPSERVER");
    311         if(logserver) {
     311//testestset
     312        if(logserver && loadNr == 1) {
     313//testestset
    312314             sock_init();
    313315
     
    382384     
    383385#ifdef LOG_TIME
    384       if(sel == 0x150b && !fIsOS2Image)
     386      if(sel == 0x150b && fSwitchTIBSel)
    385387        fprintf(flog,
    386388                "t%02d (%3d): (%x) (FS=150B) ",
     
    395397                GetTickCount());
    396398#else
    397       if(sel == 0x150b && !fIsOS2Image)
     399      if(sel == 0x150b && fSwitchTIBSel)
    398400        fprintf(flog,
    399401#ifdef SHOW_FPU_CONTROLREG
     
    443445            ulCallDepth = 0;
    444446#endif
    445             if(sel == 0x150b && !fIsOS2Image)
     447            if(sel == 0x150b && fSwitchTIBSel)
    446448                sprintf(logbuffer, "t%02d (%3d): (FS=150B) ",
    447449                        LOWORD(teb->o.odin.threadId), ulCallDepth);
  • trunk/src/kernel32/kernel32dbg.def

    r9708 r9800  
    1 ; $Id: kernel32dbg.def,v 1.24 2003-01-22 17:06:19 sandervl Exp $
     1; $Id: kernel32dbg.def,v 1.25 2003-02-13 15:30:52 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
     
    12141214    _ODIN_SetProcAddress@12                                       @2101 NONAME
    12151215
     1216; override TIB switching
     1217    _ODIN_SetTIBSwitch@4                                          @2102 NONAME                                           
     1218
    12161219    GetDisplayCodepage                                            @3000 NONAME
    12171220    GetWindowsCodepage                                            @3001 NONAME
  • trunk/src/kernel32/winexelx.cpp

    r9533 r9800  
    1 /* $Id: winexelx.cpp,v 1.11 2002-12-20 10:38:58 sandervl Exp $ */
     1/* $Id: winexelx.cpp,v 1.12 2003-02-13 15:30:53 sandervl Exp $ */
    22
    33/*
     
    4747  //Signal to TEB management that we're a real OS/2 app and don't
    4848  //require setting FS to our special win32 selector
     49  fSwitchTIBSel = FALSE;
     50
     51  //We're an OS/2 app
    4952  fIsOS2Image = TRUE;
    5053
  • 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.