ntdll: Allocate TEB FLS data in LdrInitializeThunk().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
767fa07092
commit
87ea7698ab
@ -2629,8 +2629,7 @@ todo_wine
|
||||
SetLastError(0xdeadbeef);
|
||||
value = pFlsGetValue(fls_index);
|
||||
ok(!value, "FlsGetValue returned %p, expected NULL\n", value);
|
||||
todo_wine
|
||||
ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError());
|
||||
ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError());
|
||||
ret = pFlsSetValue(fls_index, (void*) 0x31415);
|
||||
ok(ret, "FlsSetValue failed\n");
|
||||
fls_count++;
|
||||
|
@ -3511,6 +3511,8 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
InsertHeadList( &tls_links, &NtCurrentTeb()->TlsLinks );
|
||||
RtlReleasePebLock();
|
||||
|
||||
NtCurrentTeb()->FlsSlots = fls_alloc_data();
|
||||
|
||||
if (!attach_done) /* first time around */
|
||||
{
|
||||
attach_done = 1;
|
||||
|
@ -129,5 +129,6 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
|
||||
|
||||
/* FLS data */
|
||||
extern void init_global_fls_data(void) DECLSPEC_HIDDEN;
|
||||
extern TEB_FLS_DATA *fls_alloc_data(void) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif
|
||||
|
@ -294,7 +294,7 @@ static unsigned int fls_chunk_index_from_index( unsigned int index, unsigned int
|
||||
return chunk_index;
|
||||
}
|
||||
|
||||
static TEB_FLS_DATA * fls_alloc_data(void)
|
||||
TEB_FLS_DATA *fls_alloc_data(void)
|
||||
{
|
||||
TEB_FLS_DATA *fls;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user