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
10c1f245
Commit
10c1f245
authored
Jun 26, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use create_request_async in flush request handler.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c56c42ff
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
28 deletions
+27
-28
file.c
dlls/ntdll/file.c
+0
-1
device.c
server/device.c
+3
-3
fd.c
server/fd.c
+3
-4
file.c
server/file.c
+8
-4
file.h
server/file.h
+2
-2
named_pipe.c
server/named_pipe.c
+11
-14
No files found.
dlls/ntdll/file.c
View file @
10c1f245
...
...
@@ -3424,7 +3424,6 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock
if
(
hEvent
)
{
NtWaitForSingleObject
(
hEvent
,
FALSE
,
NULL
);
NtClose
(
hEvent
);
ret
=
STATUS_SUCCESS
;
}
}
...
...
server/device.c
View file @
10c1f245
...
...
@@ -176,7 +176,7 @@ static void device_file_destroy( struct object *obj );
static
enum
server_fd_type
device_file_get_fd_type
(
struct
fd
*
fd
);
static
int
device_file_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
device_file_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
obj_handle_
t
device_file_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
in
t
device_file_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
device_file_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
const
struct
object_ops
device_file_ops
=
...
...
@@ -527,7 +527,7 @@ static int device_file_write( struct fd *fd, struct async *async, file_pos_t pos
return
handle
;
}
static
obj_handle_
t
device_file_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
static
in
t
device_file_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
{
struct
device_file
*
file
=
get_fd_user
(
fd
);
struct
irp_call
*
irp
;
...
...
@@ -541,7 +541,7 @@ static obj_handle_t device_file_flush( struct fd *fd, struct async *async )
irp
=
create_irp
(
file
,
&
params
,
NULL
);
if
(
!
irp
)
return
0
;
handle
=
queue_irp
(
file
,
irp
,
async
,
1
);
handle
=
queue_irp
(
file
,
irp
,
async
,
0
);
release_object
(
irp
);
return
handle
;
}
...
...
server/fd.c
View file @
10c1f245
...
...
@@ -2172,7 +2172,7 @@ int no_fd_write( struct fd *fd, struct async *async, file_pos_t pos )
}
/* default flush() routine */
obj_handle_
t
no_fd_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
in
t
no_fd_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
return
0
;
...
...
@@ -2373,10 +2373,9 @@ DECL_HANDLER(flush)
if
(
!
fd
)
return
;
async
=
create_async
(
fd
,
current
,
&
req
->
async
,
NULL
);
if
(
async
)
if
((
async
=
create_request_async
(
fd
,
&
req
->
async
)))
{
reply
->
event
=
fd
->
fd_ops
->
flush
(
fd
,
async
);
reply
->
event
=
async_handoff
(
async
,
fd
->
fd_ops
->
flush
(
fd
,
async
),
NULL
);
release_object
(
async
);
}
release_object
(
fd
);
...
...
server/file.c
View file @
10c1f245
...
...
@@ -74,7 +74,7 @@ static struct object *file_open_file( struct object *obj, unsigned int access,
static
void
file_destroy
(
struct
object
*
obj
);
static
int
file_get_poll_events
(
struct
fd
*
fd
);
static
obj_handle_
t
file_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
in
t
file_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
enum
server_fd_type
file_get_fd_type
(
struct
fd
*
fd
);
static
const
struct
object_ops
file_ops
=
...
...
@@ -295,11 +295,15 @@ static int file_get_poll_events( struct fd *fd )
return
events
;
}
static
obj_handle_
t
file_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
static
in
t
file_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
{
int
unix_fd
=
get_unix_fd
(
fd
);
if
(
unix_fd
!=
-
1
&&
fsync
(
unix_fd
)
==
-
1
)
file_set_error
();
return
0
;
if
(
unix_fd
!=
-
1
&&
fsync
(
unix_fd
)
==
-
1
)
{
file_set_error
();
return
0
;
}
return
1
;
}
static
enum
server_fd_type
file_get_fd_type
(
struct
fd
*
fd
)
...
...
server/file.h
View file @
10c1f245
...
...
@@ -56,7 +56,7 @@ struct fd_ops
/* perform a write on the file */
int
(
*
write
)(
struct
fd
*
,
struct
async
*
,
file_pos_t
);
/* flush the object buffers */
obj_handle_
t
(
*
flush
)(
struct
fd
*
,
struct
async
*
);
in
t
(
*
flush
)(
struct
fd
*
,
struct
async
*
);
/* perform an ioctl on the file */
int
(
*
ioctl
)(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
/* queue an async operation */
...
...
@@ -102,7 +102,7 @@ extern void fd_async_wake_up( struct fd *fd, int type, unsigned int status );
extern
void
fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
extern
int
no_fd_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
extern
int
no_fd_write
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
extern
obj_handle_
t
no_fd_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
extern
in
t
no_fd_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
extern
int
no_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
extern
int
default_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
extern
void
no_fd_queue_async
(
struct
fd
*
fd
,
struct
async
*
async
,
int
type
,
int
count
);
...
...
server/named_pipe.c
View file @
10c1f245
...
...
@@ -163,7 +163,7 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue );
static
void
pipe_server_dump
(
struct
object
*
obj
,
int
verbose
);
static
struct
fd
*
pipe_server_get_fd
(
struct
object
*
obj
);
static
void
pipe_server_destroy
(
struct
object
*
obj
);
static
obj_handle_
t
pipe_server_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
in
t
pipe_server_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
pipe_server_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
const
struct
object_ops
pipe_server_ops
=
...
...
@@ -206,7 +206,7 @@ static void pipe_client_dump( struct object *obj, int verbose );
static
int
pipe_client_signaled
(
struct
object
*
obj
,
struct
wait_queue_entry
*
entry
);
static
struct
fd
*
pipe_client_get_fd
(
struct
object
*
obj
);
static
void
pipe_client_destroy
(
struct
object
*
obj
);
static
obj_handle_
t
pipe_client_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
in
t
pipe_client_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
pipe_client_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
const
struct
object_ops
pipe_client_ops
=
...
...
@@ -648,28 +648,25 @@ static void check_flushed( void *arg )
}
}
static
obj_handle_
t
pipe_end_flush
(
struct
pipe_end
*
pipe_end
,
struct
async
*
async
)
static
in
t
pipe_end_flush
(
struct
pipe_end
*
pipe_end
,
struct
async
*
async
)
{
obj_handle_t
handle
=
0
;
if
(
use_server_io
(
pipe_end
)
&&
(
!
pipe_end
->
connection
||
list_empty
(
&
pipe_end
->
connection
->
message_queue
)))
return
0
;
return
1
;
if
(
!
fd_queue_async
(
pipe_end
->
fd
,
async
,
ASYNC_TYPE_WAIT
))
return
0
;
if
(
!
async_is_blocking
(
async
)
||
(
handle
=
alloc_handle
(
current
->
process
,
async
,
SYNCHRONIZE
,
0
)))
set_error
(
STATUS_PENDING
);
return
handle
;
set_error
(
STATUS_PENDING
);
return
1
;
}
static
obj_handle_
t
pipe_server_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
static
in
t
pipe_server_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
{
struct
pipe_server
*
server
=
get_fd_user
(
fd
);
obj_handle_t
handle
;
if
(
!
server
||
server
->
state
!=
ps_connected_server
)
return
0
;
if
(
!
server
||
server
->
state
!=
ps_connected_server
)
return
1
;
if
(
!
pipe_data_remaining
(
server
))
return
0
;
if
(
!
pipe_data_remaining
(
server
))
return
1
;
handle
=
pipe_end_flush
(
&
server
->
pipe_end
,
async
);
...
...
@@ -679,11 +676,11 @@ static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async )
return
handle
;
}
static
obj_handle_
t
pipe_client_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
static
in
t
pipe_client_flush
(
struct
fd
*
fd
,
struct
async
*
async
)
{
struct
pipe_end
*
pipe_end
=
get_fd_user
(
fd
);
/* FIXME: Support byte mode. */
return
use_server_io
(
pipe_end
)
?
pipe_end_flush
(
pipe_end
,
async
)
:
0
;
return
use_server_io
(
pipe_end
)
?
pipe_end_flush
(
pipe_end
,
async
)
:
1
;
}
static
void
message_queue_read
(
struct
pipe_end
*
pipe_end
,
struct
iosb
*
iosb
)
...
...
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