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
50171c5c
Commit
50171c5c
authored
Mar 02, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make the new named pipe server fd inherit the I/O completion if it was…
server: Make the new named pipe server fd inherit the I/O completion if it was set before connecting.
parent
9dd3fe54
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
async.c
server/async.c
+1
-1
fd.c
server/fd.c
+8
-2
file.h
server/file.h
+2
-1
named_pipe.c
server/named_pipe.c
+1
-0
No files found.
server/async.c
View file @
50171c5c
...
@@ -214,7 +214,7 @@ struct async *create_async( struct thread *thread, struct async_queue *queue, co
...
@@ -214,7 +214,7 @@ struct async *create_async( struct thread *thread, struct async_queue *queue, co
async
->
timeout
=
NULL
;
async
->
timeout
=
NULL
;
async
->
queue
=
(
struct
async_queue
*
)
grab_object
(
queue
);
async
->
queue
=
(
struct
async_queue
*
)
grab_object
(
queue
);
async
->
completion
=
NULL
;
async
->
completion
=
NULL
;
if
(
queue
->
fd
)
fd_assign_completion
(
queue
->
fd
,
&
async
->
completion
,
&
async
->
comp_key
);
if
(
queue
->
fd
)
async
->
completion
=
fd_get_completion
(
queue
->
fd
,
&
async
->
comp_key
);
list_add_tail
(
&
queue
->
queue
,
&
async
->
queue_entry
);
list_add_tail
(
&
queue
->
queue
,
&
async
->
queue_entry
);
grab_object
(
async
);
grab_object
(
async
);
...
...
server/fd.c
View file @
50171c5c
...
@@ -1940,10 +1940,16 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
...
@@ -1940,10 +1940,16 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
return
fd
;
return
fd
;
}
}
void
fd_assign_completion
(
struct
fd
*
fd
,
struct
completion
**
p_port
,
apc_param_t
*
p_key
)
struct
completion
*
fd_get_completion
(
struct
fd
*
fd
,
apc_param_t
*
p_key
)
{
{
*
p_key
=
fd
->
comp_key
;
*
p_key
=
fd
->
comp_key
;
*
p_port
=
fd
->
completion
?
(
struct
completion
*
)
grab_object
(
fd
->
completion
)
:
NULL
;
return
fd
->
completion
?
(
struct
completion
*
)
grab_object
(
fd
->
completion
)
:
NULL
;
}
void
fd_copy_completion
(
struct
fd
*
src
,
struct
fd
*
dst
)
{
assert
(
!
dst
->
completion
);
dst
->
completion
=
fd_get_completion
(
src
,
&
dst
->
comp_key
);
}
}
/* flush a file buffers */
/* flush a file buffers */
...
...
server/file.h
View file @
50171c5c
...
@@ -143,7 +143,8 @@ extern void async_set_result( struct object *obj, unsigned int status,
...
@@ -143,7 +143,8 @@ extern void async_set_result( struct object *obj, unsigned int status,
extern
int
async_waiting
(
struct
async_queue
*
queue
);
extern
int
async_waiting
(
struct
async_queue
*
queue
);
extern
void
async_terminate
(
struct
async
*
async
,
unsigned
int
status
);
extern
void
async_terminate
(
struct
async
*
async
,
unsigned
int
status
);
extern
void
async_wake_up
(
struct
async_queue
*
queue
,
unsigned
int
status
);
extern
void
async_wake_up
(
struct
async_queue
*
queue
,
unsigned
int
status
);
extern
void
fd_assign_completion
(
struct
fd
*
fd
,
struct
completion
**
p_port
,
apc_param_t
*
p_key
);
extern
struct
completion
*
fd_get_completion
(
struct
fd
*
fd
,
apc_param_t
*
p_key
);
extern
void
fd_copy_completion
(
struct
fd
*
src
,
struct
fd
*
dst
);
/* access rights that require Unix read permission */
/* access rights that require Unix read permission */
#define FILE_UNIX_READ_ACCESS (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA)
#define FILE_UNIX_READ_ACCESS (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA)
...
...
server/named_pipe.c
View file @
50171c5c
...
@@ -830,6 +830,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
...
@@ -830,6 +830,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
server
->
fd
=
create_anonymous_fd
(
&
pipe_server_fd_ops
,
fds
[
0
],
&
server
->
obj
,
server
->
options
);
server
->
fd
=
create_anonymous_fd
(
&
pipe_server_fd_ops
,
fds
[
0
],
&
server
->
obj
,
server
->
options
);
if
(
client
->
fd
&&
server
->
fd
)
if
(
client
->
fd
&&
server
->
fd
)
{
{
fd_copy_completion
(
server
->
ioctl_fd
,
server
->
fd
);
if
(
server
->
state
==
ps_wait_open
)
if
(
server
->
state
==
ps_wait_open
)
fd_async_wake_up
(
server
->
ioctl_fd
,
ASYNC_TYPE_WAIT
,
STATUS_SUCCESS
);
fd_async_wake_up
(
server
->
ioctl_fd
,
ASYNC_TYPE_WAIT
,
STATUS_SUCCESS
);
set_server_state
(
server
,
ps_connected_server
);
set_server_state
(
server
,
ps_connected_server
);
...
...
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