kernel32: Moved GetThreadSelectorEntry to thread.c.
This commit is contained in:
parent
2c491feb4b
commit
b088cc5781
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue