kernel32: Moved GetThreadSelectorEntry to thread.c.

This commit is contained in:
Alexandre Julliard 2009-09-28 19:58:45 +02:00
parent 2c491feb4b
commit b088cc5781
2 changed files with 22 additions and 26 deletions

View File

@ -559,38 +559,14 @@ LPVOID WINAPI MapSLFix( SEGPTR sptr )
return MapSL(sptr); return MapSL(sptr);
} }
#ifdef __i386__
/*********************************************************************** /***********************************************************************
* UnMapSLFixArray (KERNEL32.@) * UnMapSLFixArray (KERNEL32.@)
* *
* Must not change EAX, hence defined as asm function. * Must not change EAX, hence defined as asm function.
*/ */
#ifdef __i386__
__ASM_STDCALL_FUNC( UnMapSLFixArray, 8, "ret $8" ) __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.@) * SMapLS (KERNEL32.@)

View File

@ -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 */ /* callback for QueueUserAPC */
static void CALLBACK call_user_apc( ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3 ) static void CALLBACK call_user_apc( ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3 )
{ {