Changeset 5128 for trunk/src/kernel32


Ignore:
Timestamp:
Feb 14, 2001, 11:36:45 AM (25 years ago)
Author:
sandervl
Message:

TLS index allocation + RtlUnwind fixes

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

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

    r5037 r5128  
    1 /* $Id: exceptions.cpp,v 1.49 2001-01-29 01:22:21 bird Exp $ */
     1/* $Id: exceptions.cpp,v 1.50 2001-02-14 10:36:45 sandervl Exp $ */
    22
    33/* WARNING: Compiling this module with ICC with optimizations turned on   */
     
    256256
    257257/*******************************************************************
     258 *         EXC_UnwindHandler
     259 *
     260 * Handler for exceptions happening inside an unwind handler.
     261 */
     262static DWORD WIN32API EXC_UnwindHandler( WINEXCEPTION_RECORD *rec, WINEXCEPTION_FRAME *frame,
     263//                              WINCONTEXT *context, WINEXCEPTION_FRAME **dispatcher )
     264                                WINCONTEXT *context, LPVOID dispatcher )
     265{
     266    if (!(rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)))
     267        return ExceptionContinueSearch;
     268    /* We shouldn't get here so we store faulty frame in dispatcher */
     269    *(PWINEXCEPTION_FRAME*)dispatcher = ((EXC_NESTED_FRAME*)frame)->prevFrame;
     270    return ExceptionCollidedUnwind;
     271}
     272
     273/*******************************************************************
    258274 *         EXC_CallHandler
    259275 *
     
    461477        /* Call handler */
    462478        dprintf(("KERNEL32: RtlUnwind - calling exception handler %08X", frame->Handler));
    463         rc = frame->Handler(pRecord, frame, &context, &dispatch);
     479        rc = EXC_CallHandler(pRecord, frame, &context, &dispatch, frame->Handler, EXC_UnwindHandler );
    464480        dprintf(("KERNEL32: RtlUnwind - handler returned %#x", rc));
    465481        switch (rc)
  • trunk/src/kernel32/windllbase.cpp

    r4739 r5128  
    1 /* $Id: windllbase.cpp,v 1.23 2000-12-03 10:12:33 sandervl Exp $ */
     1/* $Id: windllbase.cpp,v 1.24 2001-02-14 10:36:45 sandervl Exp $ */
    22
    33/*
     
    405405    }
    406406
    407     //Allocate TLS index for this module
    408     tlsAlloc();
    409     tlsAttachThread();    //setup TLS (main thread)
    410 
    411407    if(dllEntryPoint == NULL) {
    412408        dprintf(("attachProcess not required for dll %s", szModule));
  • trunk/src/kernel32/winexebase.cpp

    r5090 r5128  
    1 /* $Id: winexebase.cpp,v 1.13 2001-02-11 10:34:45 sandervl Exp $ */
     1/* $Id: winexebase.cpp,v 1.14 2001-02-14 10:36:45 sandervl Exp $ */
    22
    33/*
     
    110110  SetWin32TIB();
    111111
    112   //Allocate TLS index for this module
    113   tlsAlloc();
    114   tlsAttachThread();    //setup TLS (main thread)
    115 
    116112  //Set default FPU control word (no exceptions); same as in NT
    117113  CONTROL87(0x27F, 0xFFF);
  • trunk/src/kernel32/winimagepeldr.cpp

    r5011 r5128  
    1 /* $Id: winimagepeldr.cpp,v 1.66 2001-01-22 18:26:51 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.67 2001-02-14 10:36:45 sandervl Exp $ */
    22
    33/*
     
    628628    }
    629629
     630    //Allocate TLS index for this module
     631    //Must do this before dlls are loaded for this module. Some apps assume
     632    //they get TLS index 0 for their main executable
     633    tlsAlloc();
     634    tlsAttachThread();  //setup TLS (main thread)
     635
    630636    if(!(dwFlags & (FLAG_PELDR_LOADASDATAFILE | FLAG_PELDR_SKIPIMPORTS)))
    631637    {
Note: See TracChangeset for help on using the changeset viewer.