Changeset 4658 for trunk/src/kernel32/thread.cpp
- Timestamp:
- Nov 21, 2000, 12:36:09 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/thread.cpp
r3422 r4658 1 /* $Id: thread.cpp,v 1.2 5 2000-04-18 20:06:38sandervl Exp $ */1 /* $Id: thread.cpp,v 1.26 2000-11-21 11:35:09 sandervl Exp $ */ 2 2 3 3 /* … … 48 48 HANDLE WIN32API GetCurrentThread() 49 49 { 50 T HDB *thdb;50 TEB *teb; 51 51 52 t hdb = GetThreadTHDB();53 if(t hdb == 0) {52 teb = GetThreadTEB(); 53 if(teb == 0) { 54 54 SetLastError(ERROR_INVALID_HANDLE); //todo 55 55 return 0; 56 56 } 57 return t hdb->hThread;57 return teb->o.odin.hThread; 58 58 } 59 59 //****************************************************************************** … … 62 62 { 63 63 EXCEPTION_FRAME *exceptFrame; 64 T HDB *thdb;64 TEB *teb; 65 65 66 66 dprintf(("ExitThread %x (%x)", GetCurrentThread(), exitcode)); 67 67 68 t hdb = GetThreadTHDB();69 if(t hdb != 0) {70 exceptFrame = (EXCEPTION_FRAME *)t hdb->exceptFrame;68 teb = GetThreadTEB(); 69 if(teb != 0) { 70 exceptFrame = (EXCEPTION_FRAME *)teb->o.odin.exceptFrame; 71 71 } 72 72 else DebugInt3(); … … 113 113 winteb->flags = me->dwFlags; 114 114 115 THDB *thdb = (THDB *)(winteb+1); 116 thdb->entry_point = (void *)winthread; 117 thdb->entry_arg = (void *)userdata; 118 thdb->hThread = hThread; 115 winteb->entry_point = (void *)winthread; 116 winteb->entry_arg = (void *)userdata; 117 winteb->o.odin.hThread = hThread; 119 118 120 thdb->hab = OSLibWinInitialize();121 thdb->hmq = OSLibWinQueryMsgQueue(thdb->hab);122 dprintf(("Win32ThreadProc: hab %x hmq %x", thdb->hab, thdb->hmq));119 winteb->o.odin.hab = OSLibWinInitialize(); 120 winteb->o.odin.hmq = OSLibWinQueryMsgQueue(winteb->o.odin.hab); 121 dprintf(("Win32ThreadProc: hab %x hmq %x", winteb->o.odin.hab, winteb->o.odin.hmq)); 123 122 124 123 //Note: The Win32 exception structure referenced by FS:[0] is the same 125 124 // in OS/2 126 125 OS2SetExceptionHandler((void *)&exceptFrame); 127 thdb->exceptFrame = (ULONG)&exceptFrame;126 winteb->o.odin.exceptFrame = (ULONG)&exceptFrame; 128 127 129 128 SetWin32TIB(); … … 137 136 138 137 HMSetThreadTerminated(GetCurrentThread()); 139 thdb->exceptFrame = 0;138 winteb->o.odin.exceptFrame = 0; 140 139 Win32DllBase::detachThreadFromAllDlls(); //send DLL_THREAD_DETACH message to all dlls 141 140 Win32DllBase::tlsDetachThreadFromAllDlls(); //destroy TLS structures of all dlls
Note:
See TracChangeset
for help on using the changeset viewer.