server: Remove no longer needed blocking argument from ioctl 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:17 +02:00 committed by Alexandre Julliard
parent 5126849f7f
commit 047062b28b
5 changed files with 21 additions and 27 deletions

View File

@ -177,7 +177,7 @@ 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, int blocking, file_pos_t pos );
static obj_handle_t device_file_write( struct fd *fd, struct async *async, int blocking, 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_ioctl( struct fd *fd, ioctl_code_t code, struct async *async, int blocking );
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 =
{
@ -545,8 +545,7 @@ static obj_handle_t device_file_flush( struct fd *fd, struct async *async, int b
return handle;
}
static obj_handle_t device_file_ioctl( struct fd *fd, ioctl_code_t code, struct async *async,
int blocking )
static obj_handle_t device_file_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
{
struct device_file *file = get_fd_user( fd );
struct irp_call *irp;

View File

@ -2179,14 +2179,14 @@ obj_handle_t no_fd_flush( struct fd *fd, struct async *async, int blocking )
}
/* default ioctl() routine */
obj_handle_t no_fd_ioctl( struct fd *fd, ioctl_code_t code, struct async *async, int blocking )
obj_handle_t no_fd_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
{
set_error( STATUS_OBJECT_TYPE_MISMATCH );
return 0;
}
/* default ioctl() routine */
obj_handle_t default_fd_ioctl( struct fd *fd, ioctl_code_t code, struct async *async, int blocking )
obj_handle_t default_fd_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
{
switch(code)
{
@ -2501,7 +2501,7 @@ DECL_HANDLER(ioctl)
{
if ((async = create_async( current, &req->async, iosb )))
{
reply->wait = fd->fd_ops->ioctl( fd, req->code, async, req->blocking );
reply->wait = fd->fd_ops->ioctl( fd, req->code, async );
reply->options = fd->options;
release_object( async );
}

View File

@ -58,7 +58,7 @@ struct fd_ops
/* flush the object buffers */
obj_handle_t (*flush)(struct fd *, struct async *, int);
/* perform an ioctl on the file */
obj_handle_t (*ioctl)(struct fd *fd, ioctl_code_t code, struct async *async, int blocking );
obj_handle_t (*ioctl)(struct fd *fd, ioctl_code_t code, struct async *async );
/* queue an async operation */
void (*queue_async)(struct fd *, struct async *async, int type, int count);
/* selected events for async i/o need an update */
@ -103,8 +103,8 @@ 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, int blocking, file_pos_t pos );
extern obj_handle_t no_fd_write( struct fd *fd, struct async *async, int blocking, 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_ioctl( struct fd *fd, ioctl_code_t code, struct async *async, int blocking );
extern obj_handle_t default_fd_ioctl( struct fd *fd, ioctl_code_t code, struct async *async, int blocking );
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 void no_fd_queue_async( struct fd *fd, struct async *async, int type, int count );
extern void default_fd_queue_async( struct fd *fd, struct async *async, int type, int count );
extern void default_fd_reselect_async( struct fd *fd, struct async_queue *queue );

View File

@ -164,8 +164,7 @@ 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, int blocking );
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,
int blocking );
static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static const struct object_ops pipe_server_ops =
{
@ -208,8 +207,7 @@ static int pipe_client_signaled( struct object *obj, struct wait_queue_entry *en
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, int blocking );
static obj_handle_t pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async,
int blocking );
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 const struct object_ops pipe_client_ops =
@ -257,7 +255,7 @@ static struct object *named_pipe_device_open_file( struct object *obj, unsigned
static void named_pipe_device_destroy( struct object *obj );
static enum server_fd_type named_pipe_device_get_fd_type( struct fd *fd );
static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code,
struct async *async, int blocking );
struct async *async );
static const struct object_ops named_pipe_device_ops =
{
@ -967,8 +965,7 @@ static void pipe_end_peek( struct pipe_end *pipe_end )
if (reply_size) memcpy( buffer->Data, (const char *)message->iosb->in_data + message->read_pos, reply_size );
}
static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async,
int blocking )
static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
{
struct pipe_server *server = get_fd_user( fd );
obj_handle_t wait_handle = 0;
@ -982,7 +979,7 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct
case ps_wait_connect:
if (fd_queue_async( server->ioctl_fd, async, ASYNC_TYPE_WAIT ))
{
if (blocking) wait_handle = alloc_handle( current->process, async, SYNCHRONIZE, 0 );
if (async_is_blocking( async )) wait_handle = alloc_handle( current->process, async, SYNCHRONIZE, 0 );
set_server_state( server, ps_wait_open );
if (server->pipe->waiters) async_wake_up( server->pipe->waiters, STATUS_SUCCESS );
set_error( STATUS_PENDING );
@ -1038,12 +1035,11 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct
return 0;
default:
return default_fd_ioctl( fd, code, async, blocking );
return default_fd_ioctl( fd, code, async );
}
}
static obj_handle_t pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async,
int blocking )
static obj_handle_t pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
{
struct pipe_client *client = get_fd_user( fd );
@ -1054,7 +1050,7 @@ static obj_handle_t pipe_client_ioctl( struct fd *fd, ioctl_code_t code, struct
return 0;
default:
return default_fd_ioctl( fd, code, async, blocking );
return default_fd_ioctl( fd, code, async );
}
}
@ -1251,8 +1247,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
return &client->pipe_end.obj;
}
static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code,
struct async *async, int blocking )
static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
{
struct named_pipe_device *device = get_fd_user( fd );
@ -1285,7 +1280,7 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code,
queue_async( pipe->waiters, async );
when = buffer->TimeoutSpecified ? buffer->Timeout.QuadPart : pipe->timeout;
async_set_timeout( async, when, STATUS_IO_TIMEOUT );
if (blocking) wait_handle = alloc_handle( current->process, async, SYNCHRONIZE, 0 );
if (async_is_blocking( async )) wait_handle = alloc_handle( current->process, async, SYNCHRONIZE, 0 );
set_error( STATUS_PENDING );
}
else release_object( server );
@ -1296,7 +1291,7 @@ static obj_handle_t named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code,
}
default:
return default_fd_ioctl( fd, code, async, blocking );
return default_fd_ioctl( fd, code, async );
}
}

View File

@ -129,7 +129,7 @@ static void sock_destroy_ifchange_q( struct sock *sock );
static int sock_get_poll_events( struct fd *fd );
static void sock_poll_event( struct fd *fd, int event );
static enum server_fd_type sock_get_fd_type( struct fd *fd );
static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async, int blocking );
static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async );
static void sock_queue_async( struct fd *fd, struct async *async, int type, int count );
static void sock_reselect_async( struct fd *fd, struct async_queue *queue );
@ -534,7 +534,7 @@ static enum server_fd_type sock_get_fd_type( struct fd *fd )
return FD_TYPE_SOCKET;
}
obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async, int blocking )
obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
{
struct sock *sock = get_fd_user( fd );
obj_handle_t wait_handle = 0;