From: Jacek Caban Subject: [PATCH 05/16] server: Removed no longer needed cancel_async from fd_ops. Message-Id: Date: Wed, 5 Oct 2016 21:28:04 +0200 Signed-off-by: Jacek Caban --- server/change.c | 3 +-- server/console.c | 3 +-- server/device.c | 3 +-- server/fd.c | 8 +------- server/file.c | 3 +-- server/file.h | 3 --- server/mailslot.c | 9 +++------ server/mapping.c | 3 +-- server/named_pipe.c | 9 +++------ server/serial.c | 3 +-- server/sock.c | 6 ++---- 11 files changed, 15 insertions(+), 38 deletions(-) diff --git a/server/change.c b/server/change.c index 7c0ca99..bada36b 100644 --- a/server/change.c +++ b/server/change.c @@ -189,8 +189,7 @@ static const struct fd_ops dir_fd_ops = no_fd_flush, /* flush */ default_fd_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; static struct list change_list = LIST_INIT(change_list); diff --git a/server/console.c b/server/console.c index 32d3137..5b69e76 100644 --- a/server/console.c +++ b/server/console.c @@ -193,8 +193,7 @@ static const struct fd_ops console_fd_ops = no_fd_flush, /* flush */ default_fd_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; static struct list screen_buffer_list = LIST_INIT(screen_buffer_list); diff --git a/server/device.c b/server/device.c index e4f55c7..ba26fac 100644 --- a/server/device.c +++ b/server/device.c @@ -220,8 +220,7 @@ static const struct fd_ops device_file_fd_ops = device_file_flush, /* flush */ device_file_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; diff --git a/server/fd.c b/server/fd.c index 6491e87..ec08b20 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2116,12 +2116,6 @@ void default_fd_reselect_async( struct fd *fd, struct async_queue *queue ) } } -/* default cancel_async() fd routine */ -int default_fd_cancel_async( struct fd *fd, struct process *process, struct thread *thread, client_ptr_t iosb ) -{ - return async_wake_up_by( &fd->async_queues, process, thread, iosb, STATUS_CANCELLED ); -} - /* add async queue to queue list */ void fd_add_async_queue( struct fd *fd, struct list *queue_entry ) { @@ -2529,7 +2523,7 @@ DECL_HANDLER(cancel_async) if (fd) { - int count = fd->fd_ops->cancel_async( fd, current->process, thread, req->iosb ); + int count = async_wake_up_by( &fd->async_queues, current->process, thread, req->iosb, STATUS_CANCELLED ); if (!count && req->iosb) set_error( STATUS_NOT_FOUND ); release_object( fd ); } diff --git a/server/file.c b/server/file.c index dacb24a..2f5371d 100644 --- a/server/file.c +++ b/server/file.c @@ -109,8 +109,7 @@ static const struct fd_ops file_fd_ops = file_flush, /* flush */ default_fd_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; static inline int is_overlapped( const struct file *file ) diff --git a/server/file.h b/server/file.h index 638ad5e..816dbfb 100644 --- a/server/file.h +++ b/server/file.h @@ -51,8 +51,6 @@ struct fd_ops void (*queue_async)(struct fd *, const async_data_t *data, int type, int count); /* selected events for async i/o need an update */ void (*reselect_async)( struct fd *, struct async_queue *queue ); - /* cancel an async operation */ - int (*cancel_async)(struct fd *, struct process *process, struct thread *thread, client_ptr_t iosb); }; /* file descriptor functions */ @@ -100,7 +98,6 @@ extern obj_handle_t default_fd_ioctl( struct fd *fd, ioctl_code_t code, const as extern void no_fd_queue_async( struct fd *fd, const async_data_t *data, int type, int count ); extern void default_fd_queue_async( struct fd *fd, const async_data_t *data, int type, int count ); extern void default_fd_reselect_async( struct fd *fd, struct async_queue *queue ); -extern int default_fd_cancel_async( struct fd *fd, struct process *process, struct thread *thread, client_ptr_t iosb ); extern void main_loop(void); extern void remove_process_locks( struct process *process ); diff --git a/server/mailslot.c b/server/mailslot.c index 13e6703..3ddfab5 100644 --- a/server/mailslot.c +++ b/server/mailslot.c @@ -106,8 +106,7 @@ static const struct fd_ops mailslot_fd_ops = no_fd_flush, /* flush */ default_fd_ioctl, /* ioctl */ mailslot_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; @@ -160,8 +159,7 @@ static const struct fd_ops mail_writer_fd_ops = no_fd_flush, /* flush */ default_fd_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; @@ -214,8 +212,7 @@ static const struct fd_ops mailslot_device_fd_ops = no_fd_flush, /* flush */ default_fd_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; static void mailslot_destroy( struct object *obj) diff --git a/server/mapping.c b/server/mapping.c index f82907b..f03ea7a 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -108,8 +108,7 @@ static const struct fd_ops mapping_fd_ops = no_fd_flush, /* flush */ no_fd_ioctl, /* ioctl */ no_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; static struct list shared_list = LIST_INIT(shared_list); diff --git a/server/named_pipe.c b/server/named_pipe.c index cfee4d5..db54596 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -180,8 +180,7 @@ static const struct fd_ops pipe_server_fd_ops = pipe_server_flush, /* flush */ pipe_server_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async, /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; /* client end functions */ @@ -224,8 +223,7 @@ static const struct fd_ops pipe_client_fd_ops = pipe_client_flush, /* flush */ default_fd_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; static void named_pipe_device_dump( struct object *obj, int verbose ); @@ -272,8 +270,7 @@ static const struct fd_ops named_pipe_device_fd_ops = no_fd_flush, /* flush */ named_pipe_device_ioctl, /* ioctl */ default_fd_queue_async, /* queue_async */ - default_fd_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + default_fd_reselect_async /* reselect_async */ }; static void named_pipe_dump( struct object *obj, int verbose ) diff --git a/server/serial.c b/server/serial.c index 03d726a..df462ea 100644 --- a/server/serial.c +++ b/server/serial.c @@ -120,8 +120,7 @@ static const struct fd_ops serial_fd_ops = no_fd_flush, /* flush */ default_fd_ioctl, /* ioctl */ serial_queue_async, /* queue_async */ - serial_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + serial_reselect_async /* reselect_async */ }; /* check if the given fd is a serial port */ diff --git a/server/sock.c b/server/sock.c index e580412..fc2f673 100644 --- a/server/sock.c +++ b/server/sock.c @@ -169,8 +169,7 @@ static const struct fd_ops sock_fd_ops = no_fd_flush, /* flush */ sock_ioctl, /* ioctl */ sock_queue_async, /* queue_async */ - sock_reselect_async, /* reselect_async */ - default_fd_cancel_async /* cancel_async */ + sock_reselect_async /* reselect_async */ }; @@ -1000,8 +999,7 @@ static const struct fd_ops ifchange_fd_ops = no_fd_flush, /* flush */ no_fd_ioctl, /* ioctl */ NULL, /* queue_async */ - ifchange_reselect_async, /* reselect_async */ - NULL /* cancel_async */ + ifchange_reselect_async /* reselect_async */ }; static void ifchange_dump( struct object *obj, int verbose )