Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1ec0769c
Commit
1ec0769c
authored
Dec 12, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Use a direct server call instead of GetConsoleInputWaitHandle().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
41186978
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
sync.c
dlls/kernelbase/sync.c
+18
-2
No files found.
dlls/kernelbase/sync.c
View file @
1ec0769c
...
...
@@ -37,6 +37,7 @@
#include "kernelbase.h"
#include "wine/asm.h"
#include "wine/exception.h"
#include "wine/server.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
sync
);
...
...
@@ -128,6 +129,8 @@ static BOOL get_open_object_attributes( OBJECT_ATTRIBUTES *attr, UNICODE_STRING
static
HANDLE
normalize_handle_if_console
(
HANDLE
handle
)
{
static
HANDLE
wait_event
;
if
((
handle
==
(
HANDLE
)
STD_INPUT_HANDLE
)
||
(
handle
==
(
HANDLE
)
STD_OUTPUT_HANDLE
)
||
(
handle
==
(
HANDLE
)
STD_ERROR_HANDLE
))
...
...
@@ -136,9 +139,22 @@ static HANDLE normalize_handle_if_console( HANDLE handle )
/* even screen buffer console handles are waitable, and are
* handled as a handle to the console itself
*/
if
(
is_console_handle
(
handle
)
&&
VerifyConsoleIoHandle
(
handle
))
handle
=
GetConsoleInputWaitHandle
();
if
(
is_console_handle
(
handle
))
{
HANDLE
event
=
0
;
SERVER_START_REQ
(
get_console_wait_event
)
{
req
->
handle
=
wine_server_obj_handle
(
console_handle_map
(
handle
));
if
(
!
wine_server_call
(
req
))
event
=
wine_server_ptr_handle
(
reply
->
event
);
}
SERVER_END_REQ
;
if
(
event
)
{
if
(
InterlockedCompareExchangePointer
(
&
wait_event
,
event
,
0
))
NtClose
(
event
);
handle
=
wait_event
;
}
}
return
handle
;
}
...
...
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