mirror of
https://github.com/reactos/wine.git
synced 2025-02-18 11:58:22 +00:00
Bugfix: always clear QS_... from *both* changeBits and waitBits.
Bugfix: queue->hSendingTask is *queue* handle, not task handle.
This commit is contained in:
parent
d604eb12ff
commit
ae3fbab8e4
@ -608,7 +608,6 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
|
||||
if( !(queue->wakeBits & QS_SMPARAMSFREE) )
|
||||
{
|
||||
TRACE(sendmsg,"\tIntertask SendMessage: sleeping since unreplied SendMessage pending\n");
|
||||
queue->changeBits &= ~QS_SMPARAMSFREE;
|
||||
QUEUE_WaitBits( QS_SMPARAMSFREE );
|
||||
}
|
||||
|
||||
@ -622,7 +621,7 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
|
||||
queue->hPrevSendingTask = destQ->hSendingTask;
|
||||
destQ->hSendingTask = GetTaskQueue(0);
|
||||
|
||||
queue->wakeBits &= ~QS_SMPARAMSFREE;
|
||||
QUEUE_ClearWakeBit( queue, QS_SMPARAMSFREE );
|
||||
queue->flags = (queue->flags & ~(QUEUE_SM_WIN32|QUEUE_SM_UNICODE)) | flags;
|
||||
|
||||
TRACE(sendmsg,"%*ssm: smResultInit = %08x\n", prevSMRL, "", (unsigned)&qCtrl);
|
||||
@ -637,11 +636,7 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
|
||||
{
|
||||
if (!(queue->wakeBits & QS_SMRESULT))
|
||||
{
|
||||
queue->changeBits &= ~QS_SMRESULT;
|
||||
if (THREAD_IsWin16( THREAD_Current() ))
|
||||
DirectedYield( destQ->hTask );
|
||||
else
|
||||
QUEUE_Signal( destQ->hTask );
|
||||
if (THREAD_IsWin16( THREAD_Current() )) DirectedYield( destQ->hTask );
|
||||
QUEUE_WaitBits( QS_SMRESULT );
|
||||
TRACE(sendmsg,"\tsm: have result!\n");
|
||||
}
|
||||
@ -653,7 +648,7 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
|
||||
queue->smResult->lResult = queue->SendMessageReturn;
|
||||
queue->smResult->bPending = FALSE;
|
||||
}
|
||||
queue->wakeBits &= ~QS_SMRESULT;
|
||||
QUEUE_ClearWakeBit( queue, QS_SMRESULT );
|
||||
|
||||
if( queue->smResult != &qCtrl )
|
||||
ERR(sendmsg, "%*ssm: weird scenes inside the goldmine!\n", prevSMRL, "");
|
||||
@ -703,7 +698,7 @@ void WINAPI ReplyMessage16( LRESULT result )
|
||||
queue->InSendMessageHandle = 0;
|
||||
|
||||
QUEUE_SetWakeBit( senderQ, QS_SMRESULT );
|
||||
if (THREAD_IsWin16(THREAD_Current())) DirectedYield( queue->hSendingTask );
|
||||
if (THREAD_IsWin16(THREAD_Current())) DirectedYield( senderQ->hTask );
|
||||
}
|
||||
|
||||
|
||||
|
@ -361,10 +361,7 @@ void QUEUE_ReceiveMessage( MESSAGEQUEUE *queue )
|
||||
{ TRACE(msg,"\trcm: nothing to do\n"); return; }
|
||||
|
||||
if( !senderQ->hPrevSendingTask )
|
||||
{
|
||||
queue->wakeBits &= ~QS_SENDMESSAGE; /* no more sent messages */
|
||||
queue->changeBits &= ~QS_SENDMESSAGE;
|
||||
}
|
||||
QUEUE_ClearWakeBit( queue, QS_SENDMESSAGE ); /* no more sent messages */
|
||||
|
||||
/* Save current state on stack */
|
||||
prevSender = queue->InSendMessageHandle;
|
||||
@ -445,7 +442,8 @@ void QUEUE_FlushMessages( HQUEUE16 hQueue )
|
||||
TRACE(msg,"\tfrom queue %04x, smResult %08x\n", queue->hSendingTask, (unsigned)CtrlPtr );
|
||||
|
||||
if( !(queue->hSendingTask = senderQ->hPrevSendingTask) )
|
||||
queue->wakeBits &= ~QS_SENDMESSAGE;
|
||||
QUEUE_ClearWakeBit( queue, QS_SENDMESSAGE );
|
||||
|
||||
QUEUE_SetWakeBit( senderQ, QS_SMPARAMSFREE );
|
||||
|
||||
queue->smResultCurrent = CtrlPtr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user