From a45931c6f3483bf73509c155e32b2c4bc68f54ab Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 15 Apr 2004 05:04:53 +0000 Subject: [PATCH] Get rid of the TEB flags, they are no longer used. --- dlls/kernel/kernel_main.c | 2 +- dlls/kernel/task.c | 1 - dlls/ntdll/thread.c | 2 -- include/thread.h | 7 +------ 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/dlls/kernel/kernel_main.c b/dlls/kernel/kernel_main.c index dd74a7e6e30..20df164ade1 100644 --- a/dlls/kernel/kernel_main.c +++ b/dlls/kernel/kernel_main.c @@ -99,7 +99,7 @@ static void thread_detach(void) /* free the 16-bit stack */ K32WOWGlobalFree16( NtCurrentTeb()->stack_sel ); NtCurrentTeb()->cur_stack = 0; - if (!(NtCurrentTeb()->tibflags & TEBF_WIN32)) TASK_ExitTask(); + if (NtCurrentTeb()->Tib.SubSystemTib) TASK_ExitTask(); } diff --git a/dlls/kernel/task.c b/dlls/kernel/task.c index 53a86bdf79d..22c3377849d 100644 --- a/dlls/kernel/task.c +++ b/dlls/kernel/task.c @@ -447,7 +447,6 @@ static DWORD CALLBACK task_start( TDB *pTask ) { DWORD ret; - NtCurrentTeb()->tibflags &= ~TEBF_WIN32; NtCurrentTeb()->htask16 = pTask->hSelf; NtCurrentTeb()->Tib.SubSystemTib = allocate_win16_tib( pTask ); diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 1251fd3ba08..198975f7382 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -116,7 +116,6 @@ void thread_init(void) InitializeListHead( &tls_links ); teb = alloc_teb( &size ); - teb->tibflags = TEBF_WIN32; teb->request_fd = -1; teb->reply_fd = -1; teb->wait_fd[0] = -1; @@ -250,7 +249,6 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR * teb->ClientId.UniqueProcess = (HANDLE)GetCurrentProcessId(); teb->ClientId.UniqueThread = (HANDLE)tid; - teb->tibflags = TEBF_WIN32; teb->exit_code = STILL_ACTIVE; teb->request_fd = request_pipe[1]; teb->reply_fd = -1; diff --git a/include/thread.h b/include/thread.h index cdc3b6d1fd5..8a0cf48cc86 100644 --- a/include/thread.h +++ b/include/thread.h @@ -61,8 +61,7 @@ struct debug_info typedef struct _TEB { NT_TIB Tib; /* 12- 00 Thread information block */ - WORD tibflags; /* 1!n 1c Flags (NT: EnvironmentPointer) */ - WORD mutex_count; /* 1-n 1e Win16 mutex count */ + PVOID EnvironmentPointer; /* 12- 1c EnvironmentPointer (win95: tib flags + win16 mutex count) */ CLIENT_ID ClientId; /* -2- 20 Process and thread id (win95: debug context) */ HQUEUE16 queue; /* 1!- 28 Message queue (NT: DWORD ActiveRpcHandle)*/ WORD pad1; /* --n 2a */ @@ -134,10 +133,6 @@ typedef struct _TEB } TEB; #endif /* WINE_TEB_DEFINED */ -/* Thread exception flags */ -#define TEBF_WIN32 0x0001 -#define TEBF_TRAP 0x0002 - /* scheduler/thread.c */ extern TEB *THREAD_InitStack( TEB *teb, DWORD stack_size );