Changeset 281 for trunk/include


Ignore:
Timestamp:
Jul 7, 1999, 10:11:58 AM (26 years ago)
Author:
sandervl
Message:

Major changes in PE2LX/KERNEL32 for TLS support. DLL VERSION INCREASED TO 3 AS THIS CHANGE MAKES IT INCOMPATIBLE WITH APPS CONVERTED WITH PREVIOUS VERSION OF PE2LX (OR WIN32K)

Location:
trunk/include
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/os2sel.h

    r223 r281  
    1 /* $Id: os2sel.h,v 1.3 1999-06-26 18:24:22 sandervl Exp $ */
     1/* $Id: os2sel.h,v 1.4 1999-07-07 08:11:09 sandervl Exp $ */
    22/*
    33 *
     
    1111USHORT _System RestoreOS2FS();
    1212void   _System SetFS(USHORT selector);
     13USHORT _System SetReturnFS(USHORT selector);
    1314
    1415#endif //__OS2SEL_H__
  • trunk/include/versionos2.h

    r10 r281  
    1 /* $Id: versionos2.h,v 1.2 1999-05-27 15:17:59 phaller Exp $ */
     1/* $Id: versionos2.h,v 1.3 1999-07-07 08:11:09 sandervl Exp $ */
    22
    33#ifndef __VERSIONOS2__H__
     
    1919 *
    2020 */
    21 #define PE2LX_VERSION 2
     21#define PE2LX_VERSION 3
    2222
    2323#ifndef SYSTEM
  • trunk/include/win/thread.h

    r125 r281  
    1 /* $Id: thread.h,v 1.3 1999-06-19 17:58:50 sandervl Exp $ */
     1/* $Id: thread.h,v 1.4 1999-07-07 08:11:09 sandervl Exp $ */
    22
    33/*
     
    1313#include "winbase.h"
    1414//#include "selectors.h"  /* for SET_FS */
     15
     16#ifdef __WIN32OS2__
     17#define TLS_MINIMUM_AVAILABLE   64
     18#endif
    1519
    1620struct _PDB;
     
    7175    WORD           thunk_ss;       /*  94 Yet another 16-bit stack selector */
    7276    WORD           pad3;           /*  96 */
     77#ifdef __WIN32OS2__
     78    LPVOID         tls_array[TLS_MINIMUM_AVAILABLE];  /*  98 Thread local storage */
     79#else
    7380    LPVOID         tls_array[64];  /*  98 Thread local storage */
     81#endif
    7482    DWORD          delta_priority; /* 198 Priority delta */
    7583    DWORD          unknown4[7];    /* 19c Unknown */
  • trunk/include/windll.h

    r10 r281  
    1 /* $Id: windll.h,v 1.2 1999-05-27 15:17:59 phaller Exp $ */
     1/* $Id: windll.h,v 1.3 1999-07-07 08:11:09 sandervl Exp $ */
    22
    33/*
     
    5656static  Win32Dll *getFirst();
    5757
     58//Send DLL_THREAD_ATTACH message to all dlls for a new thread
     59static  void      attachThreadToAllDlls();
     60
     61//Send DLL_THREAD_DETACH message to all dlls for thread that's about to die
     62static  void      detachThreadFromAllDlls();
     63
     64//Setup TLS structure for all dlls for a new thread
     65static  void      tlsAttachThreadToAllDlls();
     66
     67//Destroy TLS structure for all dlls for a thread that's about to die
     68static  void      tlsDetachThreadFromAllDlls();
     69
    5870        ULONG     getApi(char *name);
    5971        ULONG     getApi(int ordinal);
  • trunk/include/winimage.h

    r10 r281  
    1 /* $Id: winimage.h,v 1.2 1999-05-27 15:17:59 phaller Exp $ */
     1/* $Id: winimage.h,v 1.3 1999-07-07 08:11:09 sandervl Exp $ */
    22
    33/*
     
    124124        int   getVersionId()       { return VersionId; };
    125125
     126        void  setEntryPoint(ULONG startAddress) { entryPoint = startAddress; };
     127
     128        void  setTLSAddress(LPVOID dwTlsAddress)        { tlsAddress = dwTlsAddress; };
     129        void  setTLSIndexAddr(LPDWORD dwTlsIndexAddr)   { tlsIndexAddr = dwTlsIndexAddr; };
     130        void  setTLSInitSize(ULONG dwTlsSize)           { tlsInitSize = dwTlsSize; };
     131        void  setTLSTotalSize(ULONG dwTlsSize)          { tlsTotalSize = dwTlsSize; };
     132        void  setTLSCallBackAddr(PIMAGE_TLS_CALLBACK *dwTlsCallBackAddr)       
     133        {
     134           tlsCallBackAddr = dwTlsCallBackAddr;
     135        };
     136
     137        void  tlsAttachThread();        //setup TLS structures for new thread
     138        void  tlsDetachThread();        //destroy TLS structures
     139
    126140protected:
     141        void tlsAlloc();                //Allocate TLS index for this module
     142        void tlsDelete();               //Destroy TLS index for this module
     143
    127144        void StoreImportByOrd(Win32Dll *WinDll, ULONG ordinal, ULONG impaddr);
    128145        void StoreImportByName(Win32Dll *WinDll, char *impname, ULONG impaddr);
     
    177194
    178195        BOOL                  fNativePEImage;
     196
     197        LPVOID                  tlsAddress;             //address of TLS data
     198        LPDWORD                 tlsIndexAddr;           //address of DWORD that receives the TLS index
     199        ULONG                   tlsInitSize;            //size of initialized TLS memory block
     200        ULONG                   tlsTotalSize;           //size of TLS memory block
     201        PIMAGE_TLS_CALLBACK    *tlsCallBackAddr;        //ptr to TLS callback array
     202        ULONG                   tlsIndex;               //module TLS index
     203
    179204private:
    180205
  • trunk/include/wprocess.h

    r130 r281  
    1 /* $Id: wprocess.h,v 1.4 1999-06-20 12:46:34 sandervl Exp $ */
     1/* $Id: wprocess.h,v 1.5 1999-07-07 08:11:09 sandervl Exp $ */
    22/*
    33 * Process help functions
     
    2424void DestroyTIB();
    2525
    26 void WIN32API RestoreOS2TIB();
    27 void WIN32API SetWin32TIB();
     26void   WIN32API RestoreOS2TIB();
     27USHORT WIN32API SetWin32TIB();
    2828
    2929extern BOOL fExeStarted;
    3030
     31//Flat pointer to thread TIB structure
     32extern DWORD  *TIBFlatPtr;
     33
    3134#endif
Note: See TracChangeset for help on using the changeset viewer.