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
671a2ee8
Commit
671a2ee8
authored
Oct 08, 2001
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 08, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better handling of the timeout in WaitForInputIdle.
Use WAIT_FAILED rather than the corresponding literal.
parent
19337c7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
message.c
windows/message.c
+19
-13
No files found.
windows/message.c
View file @
671a2ee8
...
...
@@ -743,7 +743,7 @@ DWORD WINAPI MsgWaitForMultipleObjects( DWORD count, CONST HANDLE *handles,
*/
DWORD
WINAPI
WaitForInputIdle
(
HANDLE
hProcess
,
DWORD
dwTimeOut
)
{
DWORD
cur_time
,
ret
;
DWORD
start_time
,
elapsed
,
ret
;
HANDLE
idle_event
=
-
1
;
SERVER_START_REQ
(
wait_input_idle
)
...
...
@@ -753,31 +753,37 @@ DWORD WINAPI WaitForInputIdle( HANDLE hProcess, DWORD dwTimeOut )
if
(
!
(
ret
=
SERVER_CALL_ERR
()))
idle_event
=
req
->
event
;
}
SERVER_END_REQ
;
if
(
ret
)
return
0xffffffff
;
/* error */
if
(
ret
)
return
WAIT_FAILED
;
/* error */
if
(
!
idle_event
)
return
0
;
/* no event to wait on */
cur_time
=
GetTickCount
();
start_time
=
GetTickCount
();
elapsed
=
0
;
TRACE
(
"waiting for %x
\n
"
,
idle_event
);
while
(
dwTimeOut
>
GetTickCount
()
-
cur_time
||
dwTimeOut
==
INFINITE
)
do
{
ret
=
MsgWaitForMultipleObjects
(
1
,
&
idle_event
,
FALSE
,
dwTimeOut
,
QS_SENDMESSAGE
);
if
(
ret
==
(
WAIT_OBJECT_0
+
1
)
)
ret
=
MsgWaitForMultipleObjects
(
1
,
&
idle_event
,
FALSE
,
dwTimeOut
-
elapsed
,
QS_SENDMESSAGE
);
switch
(
ret
)
{
case
WAIT_OBJECT_0
+
1
:
process_sent_messages
();
continue
;
}
if
(
ret
==
WAIT_TIMEOUT
||
ret
==
0xFFFFFFFF
)
{
break
;
case
WAIT_TIMEOUT
:
case
WAIT_FAILED
:
TRACE
(
"timeout or error
\n
"
);
return
ret
;
}
else
{
default:
TRACE
(
"finished
\n
"
);
return
0
;
}
if
(
dwTimeOut
!=
INFINITE
)
{
elapsed
=
GetTickCount
()
-
start_time
;
if
(
elapsed
>
dwTimeOut
)
break
;
}
}
while
(
1
);
return
WAIT_TIMEOUT
;
}
...
...
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