Changeset 4658 for trunk/src/kernel32/wintls.cpp
- Timestamp:
- Nov 21, 2000, 12:36:09 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wintls.cpp
r4481 r4658 1 /* $Id: wintls.cpp,v 1.1 5 2000-10-11 07:22:29 sandervl Exp $ */1 /* $Id: wintls.cpp,v 1.16 2000-11-21 11:35:09 sandervl Exp $ */ 2 2 /* 3 3 * Win32 TLS API functions … … 140 140 { 141 141 DWORD index = -1; 142 T HDB *thdb;142 TEB *teb; 143 143 PDB *pdb; 144 144 DWORD mask, tibidx; 145 145 int i; 146 146 147 t hdb = GetThreadTHDB();147 teb = GetThreadTEB(); 148 148 pdb = PROCESS_Current(); 149 149 … … 167 167 } 168 168 LeaveCriticalSection(&pdb->crit_section); 169 t hdb->tls_array[index] = 0;169 teb->tls_array[index] = 0; 170 170 171 171 dprintf(("KERNEL32: TlsAlloc returned %d", index)); … … 176 176 BOOL WIN32API TlsFree(DWORD index) 177 177 { 178 T HDB *thdb;178 TEB *teb; 179 179 PDB *pdb; 180 180 int tlsidx; … … 188 188 } 189 189 190 t hdb = GetThreadTHDB();191 pdb 190 teb = GetThreadTEB(); 191 pdb = PROCESS_Current(); 192 192 193 193 EnterCriticalSection(&pdb->crit_section); … … 200 200 LeaveCriticalSection(&pdb->crit_section); 201 201 pdb->tls_bits[tlsidx] &= ~mask; 202 t hdb->tls_array[index] = 0;202 teb->tls_array[index] = 0; 203 203 SetLastError(ERROR_SUCCESS); 204 204 return TRUE; … … 213 213 { 214 214 LPVOID rc; 215 T HDB *thdb;215 TEB *teb; 216 216 217 217 if(index >= TLS_MINIMUM_AVAILABLE) … … 222 222 SetLastError(ERROR_SUCCESS); 223 223 224 t hdb = GetThreadTHDB();225 rc = t hdb->tls_array[index];224 teb = GetThreadTEB(); 225 rc = teb->tls_array[index]; 226 226 227 227 dprintf2(("KERNEL32: TlsGetValue %d returned %X\n", index, rc)); … … 232 232 BOOL WIN32API TlsSetValue(DWORD index, LPVOID val) 233 233 { 234 T HDB *thdb;234 TEB *teb; 235 235 236 236 dprintf2(("KERNEL32: TlsSetValue %d %x", index, val)); … … 242 242 SetLastError(ERROR_SUCCESS); 243 243 244 t hdb = GetThreadTHDB();245 t hdb->tls_array[index] = val;244 teb = GetThreadTEB(); 245 teb->tls_array[index] = val; 246 246 return TRUE; 247 247 }
Note:
See TracChangeset
for help on using the changeset viewer.