ntdll: Add support for fs segment in ThreadDescriptorTableEntry query.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2016-07-14 00:17:59 +02:00 committed by Alexandre Julliard
parent a73045d6a0
commit d039d188f4
1 changed files with 10 additions and 0 deletions

View File

@ -1051,6 +1051,16 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
{
if (sel == (wine_get_cs() & ~3))
tdi->Entry.HighWord.Bits.Type |= 8; /* code segment */
else if (sel == (ntdll_get_thread_data()->fs & ~3))
{
ULONG_PTR fs_base = (ULONG_PTR)NtCurrentTeb();
tdi->Entry.BaseLow = fs_base & 0xffff;
tdi->Entry.HighWord.Bits.BaseMid = (fs_base >> 16) & 0xff;
tdi->Entry.HighWord.Bits.BaseHi = (fs_base >> 24) & 0xff;
tdi->Entry.LimitLow = 0x0fff;
tdi->Entry.HighWord.Bits.LimitHi = 0;
tdi->Entry.HighWord.Bits.Granularity = 0;
}
else status = STATUS_ACCESS_DENIED;
}
}