Changeset 1052 for trunk/src/kernel32/wprocess.cpp
- Timestamp:
- Sep 25, 1999, 7:55:21 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wprocess.cpp
r966 r1052 1 /* $Id: wprocess.cpp,v 1.3 2 1999-09-18 12:07:35sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.33 1999-09-25 17:55:21 sandervl Exp $ */ 2 2 3 3 /* … … 75 75 76 76 //Allocate one dword to store the flat address of our TEB 77 TIBFlatPtr = (DWORD *)OSLibAllocThreadLocalMemory(1); 78 if(TIBFlatPtr == 0) { 79 dprintf(("InitializeTIB: local thread memory alloc failed!!")); 80 DebugInt3(); 81 return NULL; 77 if(fMainThread) { 78 TIBFlatPtr = (DWORD *)OSLibAllocThreadLocalMemory(1); 79 if(TIBFlatPtr == 0) { 80 dprintf(("InitializeTIB: local thread memory alloc failed!!")); 81 DebugInt3(); 82 return NULL; 83 } 82 84 } 83 85 if(OSLibAllocSel(PAGE_SIZE, &tibsel) == FALSE) … … 188 190 winteb = (TEB *)*TIBFlatPtr; 189 191 if(winteb) { 192 thdb = (THDB *)(winteb+1); 193 win32tibsel = thdb->teb_sel; 194 195 //Restore our win32 FS selector 196 return SetReturnFS(win32tibsel); 197 } 198 else { 199 //we didn't create this thread, so allocate a selector now 200 //NOTE: Possible memory leak (i.e. DART threads in WINMM) 201 winteb = InitializeTIB(); 202 if(winteb == NULL) { 203 DebugInt3(); 204 return GetFS(); 205 } 190 206 thdb = (THDB *)(winteb+1); 191 207 win32tibsel = thdb->teb_sel;
Note:
See TracChangeset
for help on using the changeset viewer.