Commit 901ca36b authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Allow passing task handles to GetThreadQueue() and SetFastQueue().

parent 0be24af7
......@@ -1244,7 +1244,14 @@ HQUEUE16 WINAPI SetThreadQueue( DWORD thread, HQUEUE16 hQueue )
*/
HQUEUE16 WINAPI GetThreadQueue( DWORD thread )
{
THDB *thdb = thread? THREAD_IdToTHDB( thread ) : THREAD_Current();
THDB *thdb = NULL;
if ( !thread )
thdb = THREAD_Current();
else if ( HIWORD(thread) )
thdb = THREAD_IdToTHDB( thread );
else if ( IsTask( (HTASK16)thread ) )
thdb = ((TDB *)GlobalLock16( (HANDLE16)thread ))->thdb;
return (HQUEUE16)(thdb? thdb->teb.queue : 0);
}
......@@ -1253,7 +1260,14 @@ HQUEUE16 WINAPI GetThreadQueue( DWORD thread )
*/
VOID WINAPI SetFastQueue( DWORD thread, HANDLE32 hQueue )
{
THDB *thdb = thread? THREAD_IdToTHDB( thread ) : THREAD_Current();
THDB *thdb = NULL;
if ( !thread )
thdb = THREAD_Current();
else if ( HIWORD(thread) )
thdb = THREAD_IdToTHDB( thread );
else if ( IsTask( (HTASK16)thread ) )
thdb = ((TDB *)GlobalLock16( (HANDLE16)thread ))->thdb;
if ( thdb ) thdb->teb.queue = (HQUEUE16) hQueue;
}
......
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