ntdll: Added definitions and structures for fiber local storage.
This commit is contained in:
parent
bb27b37599
commit
6d6e9a42b1
|
@ -146,6 +146,8 @@ void server_exit_thread( int status )
|
||||||
RtlAcquirePebLock();
|
RtlAcquirePebLock();
|
||||||
RemoveEntryList( &NtCurrentTeb()->TlsLinks );
|
RemoveEntryList( &NtCurrentTeb()->TlsLinks );
|
||||||
RtlReleasePebLock();
|
RtlReleasePebLock();
|
||||||
|
RtlFreeHeap( GetProcessHeap(), 0, NtCurrentTeb()->FlsSlots );
|
||||||
|
RtlFreeHeap( GetProcessHeap(), 0, NtCurrentTeb()->TlsExpansionSlots );
|
||||||
|
|
||||||
info.stack_base = NtCurrentTeb()->DeallocationStack;
|
info.stack_base = NtCurrentTeb()->DeallocationStack;
|
||||||
info.teb_base = NtCurrentTeb();
|
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 WCHAR current_dir[MAX_NT_PATH_LENGTH];
|
||||||
static RTL_BITMAP tls_bitmap;
|
static RTL_BITMAP tls_bitmap;
|
||||||
static RTL_BITMAP tls_expansion_bitmap;
|
static RTL_BITMAP tls_expansion_bitmap;
|
||||||
|
static RTL_BITMAP fls_bitmap;
|
||||||
static LIST_ENTRY tls_links;
|
static LIST_ENTRY tls_links;
|
||||||
static size_t sigstack_total_size;
|
static size_t sigstack_total_size;
|
||||||
static ULONG sigstack_zero_bits;
|
static ULONG sigstack_zero_bits;
|
||||||
|
@ -255,6 +256,7 @@ HANDLE thread_init(void)
|
||||||
peb->ProcessParameters = ¶ms;
|
peb->ProcessParameters = ¶ms;
|
||||||
peb->TlsBitmap = &tls_bitmap;
|
peb->TlsBitmap = &tls_bitmap;
|
||||||
peb->TlsExpansionBitmap = &tls_expansion_bitmap;
|
peb->TlsExpansionBitmap = &tls_expansion_bitmap;
|
||||||
|
peb->FlsBitmap = &fls_bitmap;
|
||||||
peb->LdrData = &ldr;
|
peb->LdrData = &ldr;
|
||||||
params.CurrentDirectory.DosPath.Buffer = current_dir;
|
params.CurrentDirectory.DosPath.Buffer = current_dir;
|
||||||
params.CurrentDirectory.DosPath.MaximumLength = sizeof(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_bitmap, peb->TlsBitmapBits, sizeof(peb->TlsBitmapBits) * 8 );
|
||||||
RtlInitializeBitMap( &tls_expansion_bitmap, peb->TlsExpansionBitmapBits,
|
RtlInitializeBitMap( &tls_expansion_bitmap, peb->TlsExpansionBitmapBits,
|
||||||
sizeof(peb->TlsExpansionBitmapBits) * 8 );
|
sizeof(peb->TlsExpansionBitmapBits) * 8 );
|
||||||
|
RtlInitializeBitMap( &fls_bitmap, peb->FlsBitmapBits, sizeof(peb->FlsBitmapBits) * 8 );
|
||||||
|
InitializeListHead( &peb->FlsListHead );
|
||||||
InitializeListHead( &ldr.InLoadOrderModuleList );
|
InitializeListHead( &ldr.InLoadOrderModuleList );
|
||||||
InitializeListHead( &ldr.InMemoryOrderModuleList );
|
InitializeListHead( &ldr.InMemoryOrderModuleList );
|
||||||
InitializeListHead( &ldr.InInitializationOrderModuleList );
|
InitializeListHead( &ldr.InInitializationOrderModuleList );
|
||||||
|
|
|
@ -275,6 +275,20 @@ typedef struct _PEB
|
||||||
PRTL_BITMAP TlsExpansionBitmap; /* 150 */
|
PRTL_BITMAP TlsExpansionBitmap; /* 150 */
|
||||||
ULONG TlsExpansionBitmapBits[32]; /* 154 */
|
ULONG TlsExpansionBitmapBits[32]; /* 154 */
|
||||||
ULONG SessionId; /* 1d4 */
|
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;
|
} PEB, *PPEB;
|
||||||
|
|
||||||
|
|
||||||
|
@ -343,6 +357,14 @@ typedef struct _TEB
|
||||||
ULONG WaitingOnLoaderLock; /* f84 */
|
ULONG WaitingOnLoaderLock; /* f84 */
|
||||||
PVOID Reserved5[3]; /* f88 */
|
PVOID Reserved5[3]; /* f88 */
|
||||||
PVOID *TlsExpansionSlots; /* f94 */
|
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;
|
} TEB, *PTEB;
|
||||||
# endif /* WINE_TEB_DEFINED */
|
# endif /* WINE_TEB_DEFINED */
|
||||||
#endif /* WINE_NO_TEB */
|
#endif /* WINE_NO_TEB */
|
||||||
|
|
Loading…
Reference in New Issue