ntdll: Synchronize TEB layout between winternl.h and thread.h, initialize FlsSlots on thread creation
Dmitry Timoshkov
dmitry at codeweavers.com
Fri Feb 29 21:46:06 CST 2008
Hello,
this patch should fix the regressions caused by introduction of the fiber
local storage APIs.
Changelog:
ntdll: Synchronize TEB layout between winternl.h and thread.h,
initialize FlsSlots on thread creation.
---
dlls/ntdll/thread.c | 1 +
include/thread.h | 8 ++++++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index ff00f2e..800d9f9 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -117,6 +117,7 @@ static inline NTSTATUS init_teb( TEB *teb )
teb->Tib.Self = &teb->Tib;
teb->StaticUnicodeString.Buffer = teb->StaticUnicodeBuffer;
teb->StaticUnicodeString.MaximumLength = sizeof(teb->StaticUnicodeBuffer);
+ teb->FlsSlots = NULL;
if (!(thread_data->fs = wine_ldt_alloc_fs())) return STATUS_TOO_MANY_THREADS;
thread_data->request_fd = -1;
diff --git a/include/thread.h b/include/thread.h
index 34a284f..aa29e10 100644
--- a/include/thread.h
+++ b/include/thread.h
@@ -95,6 +95,14 @@ typedef struct _TEB
ULONG WaitingOnLoaderLock; /* f84 */
PVOID Reserved5[3]; /* f88 */
PVOID *TlsExpansionSlots; /* f94 */
+ ULONG ImpersonationLocale; /* f98 */
+ ULONG IsImpersonating; /* f9c */
+ PVOID NlsCache; /* fa0 */
+ PVOID ShimData; /* fa4 */
+ ULONG HeapVirtualAffinity; /* fa8 */
+ PVOID CurrentTransactionHandle; /* fac */
+ PVOID ActiveFrame; /* fb0 */
+ PVOID *FlsSlots; /* fb4 */
} TEB;
#endif /* WINE_TEB_DEFINED */
--
1.5.4.1
More information about the wine-patches
mailing list