Commit b088cc57 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Moved GetThreadSelectorEntry to thread.c.

parent 2c491feb
......@@ -559,38 +559,14 @@ LPVOID WINAPI MapSLFix( SEGPTR sptr )
return MapSL(sptr);
}
#ifdef __i386__
/***********************************************************************
* UnMapSLFixArray (KERNEL32.@)
*
* Must not change EAX, hence defined as asm function.
*/
#ifdef __i386__
__ASM_STDCALL_FUNC( UnMapSLFixArray, 8, "ret $8" )
#endif
/***********************************************************************
* GetThreadSelectorEntry (KERNEL32.@)
*/
BOOL WINAPI GetThreadSelectorEntry( HANDLE hthread, DWORD sel, LPLDT_ENTRY ldtent )
{
THREAD_DESCRIPTOR_INFORMATION tdi;
NTSTATUS status;
tdi.Selector = sel;
status = NtQueryInformationThread( hthread, ThreadDescriptorTableEntry,
&tdi, sizeof(tdi), NULL);
if (status)
{
SetLastError( RtlNtStatusToDosError(status) );
return FALSE;
}
*ldtent = tdi.Entry;
return TRUE;
}
#ifdef __i386__
/***********************************************************************
* SMapLS (KERNEL32.@)
......
......@@ -422,6 +422,26 @@ DWORD WINAPI SetThreadIdealProcessor(
}
/***********************************************************************
* GetThreadSelectorEntry (KERNEL32.@)
*/
BOOL WINAPI GetThreadSelectorEntry( HANDLE hthread, DWORD sel, LPLDT_ENTRY ldtent )
{
THREAD_DESCRIPTOR_INFORMATION tdi;
NTSTATUS status;
tdi.Selector = sel;
status = NtQueryInformationThread( hthread, ThreadDescriptorTableEntry, &tdi, sizeof(tdi), NULL);
if (status)
{
SetLastError( RtlNtStatusToDosError(status) );
return FALSE;
}
*ldtent = tdi.Entry;
return TRUE;
}
/* callback for QueueUserAPC */
static void CALLBACK call_user_apc( ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3 )
{
......
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