Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
073e3bc9
Commit
073e3bc9
authored
Mar 28, 1999
by
Alex Korobka
Committed by
Alexandre Julliard
Mar 28, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed occasional loss of SendMessage() return value.
parent
2e23da4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
message.c
windows/message.c
+18
-11
No files found.
windows/message.c
View file @
073e3bc9
...
...
@@ -673,8 +673,10 @@ static LRESULT MSG_SendMessageInterThread( HQUEUE16 hDestQueue,
if
(
THREAD_IsWin16
(
THREAD_Current
())
&&
THREAD_IsWin16
(
destQ
->
thdb
)
)
DirectedYield16
(
destQ
->
thdb
->
teb
.
htask16
);
/* wait for the result */
while
(
!
(
smsg
->
flags
&
SMSG_HAVE_RESULT
)
)
/* wait for the result, note that 16-bit apps almost always get out of
* DirectedYield() with SMSG_HAVE_RESULT flag already set */
while
(
TRUE
)
{
/*
* The sequence is crucial to avoid deadlock situations:
...
...
@@ -686,21 +688,26 @@ static LRESULT MSG_SendMessageInterThread( HQUEUE16 hDestQueue,
* we are guaranteed that -should we now clear the QS_SMRESULT that
* was signalled already by the receiver- we will not start waiting.
*/
QUEUE_ClearWakeBit
(
queue
,
QS_SMRESULT
);
if
(
!
(
smsg
->
flags
&
SMSG_HAVE_RESULT
)
&&
QUEUE_WaitBits
(
QS_SMRESULT
,
timeout
)
==
0
)
if
(
smsg
->
flags
&
SMSG_HAVE_RESULT
)
{
/* return with timeout */
SetLastError
(
0
)
;
retVal
=
0
;
break
;
got:
*
pRes
=
smsg
->
lResult
;
TRACE
(
sendmsg
,
"smResult = %08x
\n
"
,
(
unsigned
)
*
pRes
)
;
break
;
}
QUEUE_ClearWakeBit
(
queue
,
QS_SMRESULT
);
if
(
smsg
->
flags
&
SMSG_HAVE_RESULT
)
goto
got
;
if
(
QUEUE_WaitBits
(
QS_SMRESULT
,
timeout
)
==
0
)
{
*
pRes
=
smsg
->
lResult
;
TRACE
(
sendmsg
,
"smResult = %08x
\n
"
,
(
unsigned
)
*
pRes
);
/* return with timeout */
SetLastError
(
0
);
retVal
=
0
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment