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
459d3764
Commit
459d3764
authored
Nov 10, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Support waiting on console input handles.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2b205a6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
console.c
dlls/kernel32/tests/console.c
+0
-2
console.c
server/console.c
+19
-3
No files found.
dlls/kernel32/tests/console.c
View file @
459d3764
...
...
@@ -1024,7 +1024,6 @@ static void test_wait(HANDLE input, HANDLE orig_output)
res
=
WaitForSingleObject
(
orig_output
,
0
);
ok
(
res
==
WAIT_TIMEOUT
,
"WaitForSingleObject returned %x
\n
"
,
res
);
status
=
NtWaitForSingleObject
(
input
,
FALSE
,
&
zero
);
todo_wine
ok
(
status
==
STATUS_TIMEOUT
||
broken
(
status
==
STATUS_ACCESS_DENIED
/* win2k8 */
),
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
NtWaitForSingleObject
(
output
,
FALSE
,
&
zero
);
...
...
@@ -1043,7 +1042,6 @@ static void test_wait(HANDLE input, HANDLE orig_output)
res
=
WaitForSingleObject
(
orig_output
,
0
);
ok
(
!
res
,
"WaitForSingleObject returned %x
\n
"
,
res
);
status
=
NtWaitForSingleObject
(
input
,
FALSE
,
&
zero
);
todo_wine
ok
(
!
status
||
broken
(
status
==
STATUS_ACCESS_DENIED
/* win2k8 */
),
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
NtWaitForSingleObject
(
output
,
FALSE
,
&
zero
);
...
...
server/console.c
View file @
459d3764
...
...
@@ -54,6 +54,7 @@ struct history_line
struct
console_input
{
struct
object
obj
;
/* object header */
int
signaled
;
/* is console signaled */
int
num_proc
;
/* number of processes attached to this console */
struct
thread
*
renderer
;
/* console renderer thread */
struct
screen_buffer
*
active
;
/* active screen buffer */
...
...
@@ -67,6 +68,7 @@ struct console_input
static
void
console_input_dump
(
struct
object
*
obj
,
int
verbose
);
static
void
console_input_destroy
(
struct
object
*
obj
);
static
int
console_input_signaled
(
struct
object
*
obj
,
struct
wait_queue_entry
*
entry
);
static
struct
fd
*
console_input_get_fd
(
struct
object
*
obj
);
static
struct
object
*
console_input_lookup_name
(
struct
object
*
obj
,
struct
unicode_str
*
name
,
unsigned
int
attr
);
static
struct
object
*
console_input_open_file
(
struct
object
*
obj
,
unsigned
int
access
,
...
...
@@ -77,9 +79,9 @@ static const struct object_ops console_input_ops =
sizeof
(
struct
console_input
),
/* size */
console_input_dump
,
/* dump */
no_get_type
,
/* get_type */
no_add_queue
,
/* add_queue */
NULL
,
/* remove_queue */
NULL
,
/* signaled */
add_queue
,
/* add_queue */
remove_queue
,
/* remove_queue */
console_input_signaled
,
/* signaled */
no_satisfied
,
/* satisfied */
no_signal
,
/* signal */
console_input_get_fd
,
/* get_fd */
...
...
@@ -338,6 +340,12 @@ static const struct fd_ops console_connection_fd_ops =
static
struct
list
screen_buffer_list
=
LIST_INIT
(
screen_buffer_list
);
static
int
console_input_signaled
(
struct
object
*
obj
,
struct
wait_queue_entry
*
entry
)
{
struct
console_input
*
console
=
(
struct
console_input
*
)
obj
;
return
console
->
signaled
;
}
static
struct
fd
*
console_input_get_fd
(
struct
object
*
obj
)
{
struct
console_input
*
console_input
=
(
struct
console_input
*
)
obj
;
...
...
@@ -358,6 +366,7 @@ static struct object *create_console_input(void)
return
NULL
;
console_input
->
renderer
=
NULL
;
console_input
->
signaled
=
0
;
console_input
->
num_proc
=
0
;
console_input
->
active
=
NULL
;
console_input
->
server
=
NULL
;
...
...
@@ -1195,6 +1204,13 @@ DECL_HANDLER(get_next_console_request)
if
(
req
->
signal
)
set_event
(
server
->
console
->
event
);
else
reset_event
(
server
->
console
->
event
);
if
(
!
req
->
signal
)
server
->
console
->
signaled
=
0
;
else
if
(
!
server
->
console
->
signaled
)
{
server
->
console
->
signaled
=
1
;
wake_up
(
&
server
->
console
->
obj
,
0
);
}
if
(
req
->
read
)
{
/* set result of current pending ioctl */
...
...
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