server: Remove no longer needed blocking argument from flush fd op.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2017-04-12 13:54:56 +02:00 committed by Alexandre Julliard
parent c9d9adaf65
commit 9d666869f3
5 changed files with 16 additions and 16 deletions

View File

@ -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 enum server_fd_type device_file_get_fd_type( struct fd *fd );
static obj_handle_t device_file_read( struct fd *fd, struct async *async, file_pos_t pos ); static obj_handle_t device_file_read( struct fd *fd, struct async *async, file_pos_t pos );
static obj_handle_t device_file_write( struct fd *fd, struct async *async, file_pos_t pos ); static obj_handle_t 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, int blocking ); static obj_handle_t device_file_flush( struct fd *fd, struct async *async );
static obj_handle_t device_file_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); static obj_handle_t device_file_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static const struct object_ops device_file_ops = static const struct object_ops device_file_ops =
@ -526,7 +526,7 @@ static obj_handle_t device_file_write( struct fd *fd, struct async *async, file_
return handle; return handle;
} }
static obj_handle_t device_file_flush( struct fd *fd, struct async *async, int blocking ) static obj_handle_t device_file_flush( struct fd *fd, struct async *async )
{ {
struct device_file *file = get_fd_user( fd ); struct device_file *file = get_fd_user( fd );
struct irp_call *irp; struct irp_call *irp;

View File

@ -2172,7 +2172,7 @@ obj_handle_t no_fd_write( struct fd *fd, struct async *async, file_pos_t pos )
} }
/* default flush() routine */ /* default flush() routine */
obj_handle_t no_fd_flush( struct fd *fd, struct async *async, int blocking ) obj_handle_t no_fd_flush( struct fd *fd, struct async *async )
{ {
set_error( STATUS_OBJECT_TYPE_MISMATCH ); set_error( STATUS_OBJECT_TYPE_MISMATCH );
return 0; return 0;
@ -2376,7 +2376,7 @@ DECL_HANDLER(flush)
async = create_async( current, &req->async, NULL ); async = create_async( current, &req->async, NULL );
if (async) if (async)
{ {
reply->event = fd->fd_ops->flush( fd, async, req->blocking ); reply->event = fd->fd_ops->flush( fd, async );
release_object( async ); release_object( async );
} }
release_object( fd ); release_object( fd );

View File

@ -74,7 +74,7 @@ static struct object *file_open_file( struct object *obj, unsigned int access,
static void file_destroy( struct object *obj ); static void file_destroy( struct object *obj );
static int file_get_poll_events( struct fd *fd ); static int file_get_poll_events( struct fd *fd );
static obj_handle_t file_flush( struct fd *fd, struct async *async, int blocking ); static obj_handle_t file_flush( struct fd *fd, struct async *async );
static enum server_fd_type file_get_fd_type( struct fd *fd ); static enum server_fd_type file_get_fd_type( struct fd *fd );
static const struct object_ops file_ops = static const struct object_ops file_ops =
@ -295,7 +295,7 @@ static int file_get_poll_events( struct fd *fd )
return events; return events;
} }
static obj_handle_t file_flush( struct fd *fd, struct async *async, int blocking ) static obj_handle_t file_flush( struct fd *fd, struct async *async )
{ {
int unix_fd = get_unix_fd( fd ); int unix_fd = get_unix_fd( fd );
if (unix_fd != -1 && fsync( unix_fd ) == -1) file_set_error(); if (unix_fd != -1 && fsync( unix_fd ) == -1) file_set_error();

View File

@ -56,7 +56,7 @@ struct fd_ops
/* perform a write on the file */ /* perform a write on the file */
obj_handle_t (*write)(struct fd *, struct async *, file_pos_t ); obj_handle_t (*write)(struct fd *, struct async *, file_pos_t );
/* flush the object buffers */ /* flush the object buffers */
obj_handle_t (*flush)(struct fd *, struct async *, int); obj_handle_t (*flush)(struct fd *, struct async *);
/* perform an ioctl on the file */ /* perform an ioctl on the file */
obj_handle_t (*ioctl)(struct fd *fd, ioctl_code_t code, struct async *async ); obj_handle_t (*ioctl)(struct fd *fd, ioctl_code_t code, struct async *async );
/* queue an async operation */ /* 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 void fd_reselect_async( struct fd *fd, struct async_queue *queue );
extern obj_handle_t no_fd_read( struct fd *fd, struct async *async, file_pos_t pos ); extern obj_handle_t no_fd_read( struct fd *fd, struct async *async, file_pos_t pos );
extern obj_handle_t no_fd_write( struct fd *fd, struct async *async, file_pos_t pos ); extern obj_handle_t 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, int blocking ); extern obj_handle_t no_fd_flush( struct fd *fd, struct async *async );
extern obj_handle_t no_fd_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); extern obj_handle_t no_fd_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
extern obj_handle_t default_fd_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); extern obj_handle_t 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 ); extern void no_fd_queue_async( struct fd *fd, struct async *async, int type, int count );

View File

@ -162,7 +162,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 void pipe_server_dump( struct object *obj, int verbose );
static struct fd *pipe_server_get_fd( struct object *obj ); static struct fd *pipe_server_get_fd( struct object *obj );
static void pipe_server_destroy( struct object *obj); static void pipe_server_destroy( struct object *obj);
static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int blocking ); static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async );
static enum server_fd_type pipe_server_get_fd_type( struct fd *fd ); static enum server_fd_type pipe_server_get_fd_type( struct fd *fd );
static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
@ -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 int pipe_client_signaled( struct object *obj, struct wait_queue_entry *entry );
static struct fd *pipe_client_get_fd( struct object *obj ); static struct fd *pipe_client_get_fd( struct object *obj );
static void pipe_client_destroy( struct object *obj ); static void pipe_client_destroy( struct object *obj );
static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int blocking ); static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async );
static obj_handle_t pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ); static obj_handle_t pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static enum server_fd_type pipe_client_get_fd_type( struct fd *fd ); static enum server_fd_type pipe_client_get_fd_type( struct fd *fd );
@ -650,7 +650,7 @@ static void check_flushed( void *arg )
} }
} }
static obj_handle_t pipe_end_flush( struct pipe_end *pipe_end, struct async *async, int blocking ) static obj_handle_t pipe_end_flush( struct pipe_end *pipe_end, struct async *async )
{ {
obj_handle_t handle = 0; obj_handle_t handle = 0;
@ -659,12 +659,12 @@ static obj_handle_t pipe_end_flush( struct pipe_end *pipe_end, struct async *asy
if (!fd_queue_async( pipe_end->fd, async, ASYNC_TYPE_WAIT )) return 0; if (!fd_queue_async( pipe_end->fd, async, ASYNC_TYPE_WAIT )) return 0;
if (!blocking || (handle = alloc_handle( current->process, async, SYNCHRONIZE, 0 ))) if (!async_is_blocking( async ) || (handle = alloc_handle( current->process, async, SYNCHRONIZE, 0 )))
set_error( STATUS_PENDING ); set_error( STATUS_PENDING );
return handle; return handle;
} }
static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int blocking ) static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async )
{ {
struct pipe_server *server = get_fd_user( fd ); struct pipe_server *server = get_fd_user( fd );
obj_handle_t handle; obj_handle_t handle;
@ -673,7 +673,7 @@ static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int b
if (!pipe_data_remaining( server )) return 0; if (!pipe_data_remaining( server )) return 0;
handle = pipe_end_flush( &server->pipe_end, async, blocking ); handle = pipe_end_flush( &server->pipe_end, async );
/* there's no unix way to be alerted when a pipe becomes empty, so resort to polling */ /* there's no unix way to be alerted when a pipe becomes empty, so resort to polling */
if (handle && !use_server_io( &server->pipe_end ) && !server->flush_poll) if (handle && !use_server_io( &server->pipe_end ) && !server->flush_poll)
@ -681,11 +681,11 @@ static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int b
return handle; return handle;
} }
static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int blocking ) static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async )
{ {
struct pipe_end *pipe_end = get_fd_user( fd ); struct pipe_end *pipe_end = get_fd_user( fd );
/* FIXME: Support byte mode. */ /* FIXME: Support byte mode. */
return use_server_io( pipe_end ) ? pipe_end_flush( pipe_end, async, blocking ) : 0; return use_server_io( pipe_end ) ? pipe_end_flush( pipe_end, async ) : 0;
} }
static void message_queue_read( struct pipe_end *pipe_end, struct iosb *iosb ) static void message_queue_read( struct pipe_end *pipe_end, struct iosb *iosb )