Commit 6d6e9a42 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Added definitions and structures for fiber local storage.

parent bb27b375
......@@ -146,6 +146,8 @@ void server_exit_thread( int status )
RtlAcquirePebLock();
RemoveEntryList( &NtCurrentTeb()->TlsLinks );
RtlReleasePebLock();
RtlFreeHeap( GetProcessHeap(), 0, NtCurrentTeb()->FlsSlots );
RtlFreeHeap( GetProcessHeap(), 0, NtCurrentTeb()->TlsExpansionSlots );
info.stack_base = NtCurrentTeb()->DeallocationStack;
info.teb_base = NtCurrentTeb();
......
......@@ -63,6 +63,7 @@ static RTL_USER_PROCESS_PARAMETERS params; /* default parameters if no parent *
static WCHAR current_dir[MAX_NT_PATH_LENGTH];
static RTL_BITMAP tls_bitmap;
static RTL_BITMAP tls_expansion_bitmap;
static RTL_BITMAP fls_bitmap;
static LIST_ENTRY tls_links;
static size_t sigstack_total_size;
static ULONG sigstack_zero_bits;
......@@ -255,6 +256,7 @@ HANDLE thread_init(void)
peb->ProcessParameters = &params;
peb->TlsBitmap = &tls_bitmap;
peb->TlsExpansionBitmap = &tls_expansion_bitmap;
peb->FlsBitmap = &fls_bitmap;
peb->LdrData = &ldr;
params.CurrentDirectory.DosPath.Buffer = current_dir;
params.CurrentDirectory.DosPath.MaximumLength = sizeof(current_dir);
......@@ -262,6 +264,8 @@ HANDLE thread_init(void)
RtlInitializeBitMap( &tls_bitmap, peb->TlsBitmapBits, sizeof(peb->TlsBitmapBits) * 8 );
RtlInitializeBitMap( &tls_expansion_bitmap, peb->TlsExpansionBitmapBits,
sizeof(peb->TlsExpansionBitmapBits) * 8 );
RtlInitializeBitMap( &fls_bitmap, peb->FlsBitmapBits, sizeof(peb->FlsBitmapBits) * 8 );
InitializeListHead( &peb->FlsListHead );
InitializeListHead( &ldr.InLoadOrderModuleList );
InitializeListHead( &ldr.InMemoryOrderModuleList );
InitializeListHead( &ldr.InInitializationOrderModuleList );
......
......@@ -275,6 +275,20 @@ typedef struct _PEB
PRTL_BITMAP TlsExpansionBitmap; /* 150 */
ULONG TlsExpansionBitmapBits[32]; /* 154 */
ULONG SessionId; /* 1d4 */
ULARGE_INTEGER AppCompatFlags; /* 1d8 */
ULARGE_INTEGER AppCompatFlagsUser; /* 1e0 */
PVOID ShimData; /* 1e8 */
PVOID AppCompatInfo; /* 1ec */
UNICODE_STRING CSDVersion; /* 1f0 */
PVOID ActivationContextData; /* 1f8 */
PVOID ProcessAssemblyStorageMap; /* 1fc */
PVOID SystemDefaultActivationData; /* 200 */
PVOID SystemAssemblyStorageMap; /* 204 */
ULONG MinimumStackCommit; /* 208 */
PVOID *FlsCallback; /* 20c */
LIST_ENTRY FlsListHead; /* 210 */
PRTL_BITMAP FlsBitmap; /* 218 */
ULONG FlsBitmapBits[4]; /* 21c */
} PEB, *PPEB;
......@@ -343,6 +357,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, *PTEB;
# endif /* WINE_TEB_DEFINED */
#endif /* WINE_NO_TEB */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment