Ignore:
Timestamp:
Nov 21, 2000, 12:36:09 PM (25 years ago)
Author:
sandervl
Message:

Updates for TEB changes

File:
1 edited

Legend:

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

    r4481 r4658  
    1 /* $Id: wintls.cpp,v 1.15 2000-10-11 07:22:29 sandervl Exp $ */
     1/* $Id: wintls.cpp,v 1.16 2000-11-21 11:35:09 sandervl Exp $ */
    22/*
    33 * Win32 TLS API functions
     
    140140{
    141141 DWORD index = -1;
    142  THDB *thdb;
     142 TEB  *teb;
    143143 PDB  *pdb;
    144144 DWORD mask, tibidx;
    145145 int   i;
    146146
    147   thdb = GetThreadTHDB();
     147  teb  = GetThreadTEB();
    148148  pdb  = PROCESS_Current();
    149149
     
    167167  }
    168168  LeaveCriticalSection(&pdb->crit_section);
    169   thdb->tls_array[index] = 0;
     169  teb->tls_array[index] = 0;
    170170
    171171  dprintf(("KERNEL32: TlsAlloc returned %d", index));
     
    176176BOOL WIN32API TlsFree(DWORD index)
    177177{
    178  THDB  *thdb;
     178 TEB   *teb;
    179179 PDB   *pdb;
    180180 int    tlsidx;
     
    188188  }
    189189
    190   thdb = GetThreadTHDB();
    191   pdb  = PROCESS_Current();
     190  teb = GetThreadTEB();
     191  pdb = PROCESS_Current();
    192192
    193193  EnterCriticalSection(&pdb->crit_section);
     
    200200        LeaveCriticalSection(&pdb->crit_section);
    201201        pdb->tls_bits[tlsidx] &= ~mask;
    202         thdb->tls_array[index] = 0;
     202        teb->tls_array[index] = 0;
    203203        SetLastError(ERROR_SUCCESS);
    204204        return TRUE;
     
    213213{
    214214 LPVOID rc;
    215  THDB  *thdb;
     215 TEB   *teb;
    216216
    217217  if(index >= TLS_MINIMUM_AVAILABLE)
     
    222222  SetLastError(ERROR_SUCCESS);
    223223
    224   thdb = GetThreadTHDB();
    225   rc = thdb->tls_array[index];
     224  teb = GetThreadTEB();
     225  rc = teb->tls_array[index];
    226226
    227227  dprintf2(("KERNEL32: TlsGetValue %d returned %X\n", index, rc));
     
    232232BOOL WIN32API TlsSetValue(DWORD index, LPVOID val)
    233233{
    234  THDB *thdb;
     234 TEB *teb;
    235235
    236236  dprintf2(("KERNEL32: TlsSetValue %d %x", index, val));
     
    242242  SetLastError(ERROR_SUCCESS);
    243243
    244   thdb = GetThreadTHDB();
    245   thdb->tls_array[index] = val;
     244  teb = GetThreadTEB();
     245  teb->tls_array[index] = val;
    246246  return TRUE;
    247247}
Note: See TracChangeset for help on using the changeset viewer.