mirror of
https://github.com/reactos/wine.git
synced 2025-02-08 05:08:16 +00:00
Allow UserYield16 to be called from 32-bit thread.
This commit is contained in:
parent
8de1dfa7af
commit
da5779e5bd
@ -1074,12 +1074,6 @@ void WINAPI Yield16(void)
|
||||
{
|
||||
TDB *pCurTask = (TDB *)GlobalLock16( GetCurrentTask() );
|
||||
|
||||
if ( !THREAD_IsWin16( THREAD_Current() ) )
|
||||
{
|
||||
FIXME(task, "called for Win32 thread (%04x)!\n", THREAD_Current()->teb_sel);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pCurTask) pCurTask->hYieldTo = 0;
|
||||
if (pCurTask && pCurTask->hQueue) Callout.UserYield16();
|
||||
else OldYield16();
|
||||
|
@ -1487,25 +1487,28 @@ BOOL WINAPI GetInputState(void)
|
||||
*/
|
||||
void WINAPI UserYield16(void)
|
||||
{
|
||||
TDB *pCurTask = (TDB *)GlobalLock16( GetCurrentTask() );
|
||||
MESSAGEQUEUE *queue = (MESSAGEQUEUE *)QUEUE_Lock( pCurTask->hQueue );
|
||||
|
||||
if ( !THREAD_IsWin16( THREAD_Current() ) )
|
||||
{
|
||||
FIXME(task, "called for Win32 thread (%04x)!\n", THREAD_Current()->teb_sel);
|
||||
QUEUE_Unlock( queue );
|
||||
return;
|
||||
}
|
||||
MESSAGEQUEUE *queue;
|
||||
|
||||
/* Handle sent messages */
|
||||
queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() );
|
||||
|
||||
while (queue && (queue->wakeBits & QS_SENDMESSAGE))
|
||||
QUEUE_ReceiveMessage( queue );
|
||||
|
||||
QUEUE_Unlock( queue );
|
||||
|
||||
OldYield16();
|
||||
/* Yield */
|
||||
if ( THREAD_IsWin16( THREAD_Current() ) )
|
||||
OldYield16();
|
||||
else
|
||||
{
|
||||
SYSLEVEL_LeaveWin16Lock();
|
||||
SYSLEVEL_EnterWin16Lock();
|
||||
}
|
||||
|
||||
/* Handle sent messages again */
|
||||
queue = (MESSAGEQUEUE *)QUEUE_Lock( GetFastQueue16() );
|
||||
|
||||
queue = (MESSAGEQUEUE *)QUEUE_Lock( pCurTask->hQueue );
|
||||
while (queue && (queue->wakeBits & QS_SENDMESSAGE))
|
||||
QUEUE_ReceiveMessage( queue );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user