Jacek Caban : server: Remove no longer needed blocking argument from write fd op.

Alexandre Julliard julliard at winehq.org
Wed Apr 12 15:02:34 CDT 2017


Module: wine
Branch: master
Commit: c9d9adaf65299b0c6984e69f1c83053354c947ab
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c9d9adaf65299b0c6984e69f1c83053354c947ab

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Apr 12 13:54:45 2017 +0200

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

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 server/device.c     | 4 ++--
 server/fd.c         | 4 ++--
 server/file.h       | 4 ++--
 server/named_pipe.c | 8 ++++----
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/server/device.c b/server/device.c
index 16043f5..0b39cb3 100644
--- a/server/device.c
+++ b/server/device.c
@@ -175,7 +175,7 @@ static int device_file_close_handle( struct object *obj, struct process *process
 static void device_file_destroy( struct object *obj );
 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_write( 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, 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 );
 
@@ -505,7 +505,7 @@ static obj_handle_t device_file_read( struct fd *fd, struct async *async, file_p
     return handle;
 }
 
-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_write( struct fd *fd, struct async *async, file_pos_t pos )
 {
     struct device_file *file = get_fd_user( fd );
     struct irp_call *irp;
diff --git a/server/fd.c b/server/fd.c
index 894e6b4..6297b83 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2165,7 +2165,7 @@ obj_handle_t no_fd_read( struct fd *fd, struct async *async, file_pos_t pos )
 }
 
 /* default write() routine */
-obj_handle_t no_fd_write( struct fd *fd, struct async *async, int blocking, file_pos_t pos )
+obj_handle_t no_fd_write( struct fd *fd, struct async *async, file_pos_t pos )
 {
     set_error( STATUS_OBJECT_TYPE_MISMATCH );
     return 0;
@@ -2478,7 +2478,7 @@ DECL_HANDLER(write)
         async = create_async( current, &req->async, iosb );
         if (async)
         {
-            reply->wait    = fd->fd_ops->write( fd, async, req->blocking, req->pos );
+            reply->wait    = fd->fd_ops->write( fd, async, req->pos );
             reply->options = fd->options;
             release_object( async );
         }
diff --git a/server/file.h b/server/file.h
index a08224e..7bcbc45 100644
--- a/server/file.h
+++ b/server/file.h
@@ -54,7 +54,7 @@ struct fd_ops
     /* perform a read on the file */
     obj_handle_t (*read)(struct fd *, struct async *, file_pos_t );
     /* perform a write on the file */
-    obj_handle_t (*write)(struct fd *, struct async *, int, file_pos_t );
+    obj_handle_t (*write)(struct fd *, struct async *, file_pos_t );
     /* flush the object buffers */
     obj_handle_t (*flush)(struct fd *, struct async *, int);
     /* perform an ioctl on the file */
@@ -101,7 +101,7 @@ extern int fd_queue_async( struct fd *fd, struct async *async, int type );
 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 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, int blocking, 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_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 );
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 3d96c96..9fc3f2d 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -154,7 +154,7 @@ static const struct object_ops named_pipe_ops =
 
 /* common server and client pipe end functions */
 static obj_handle_t pipe_end_read( struct fd *fd, struct async *async, file_pos_t pos );
-static obj_handle_t pipe_end_write( struct fd *fd, struct async *async_data, int blocking, file_pos_t pos );
+static obj_handle_t pipe_end_write( struct fd *fd, struct async *async_data, file_pos_t pos );
 static void pipe_end_queue_async( struct fd *fd, struct async *async, int type, int count );
 static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue );
 
@@ -845,14 +845,14 @@ static obj_handle_t pipe_end_read( struct fd *fd, struct async *async, file_pos_
     return handle;
 }
 
-static obj_handle_t pipe_end_write( struct fd *fd, struct async *async, int blocking, file_pos_t pos )
+static obj_handle_t pipe_end_write( struct fd *fd, struct async *async, file_pos_t pos )
 {
     struct pipe_end *write_end = get_fd_user( fd );
     struct pipe_end *read_end = write_end->connection;
     struct pipe_message *message;
     obj_handle_t handle = 0;
 
-    if (!use_server_io( write_end )) return no_fd_write( fd, async, blocking, pos );
+    if (!use_server_io( write_end )) return no_fd_write( fd, async, pos );
 
     if (!read_end)
     {
@@ -877,7 +877,7 @@ static obj_handle_t pipe_end_write( struct fd *fd, struct async *async, int bloc
     reselect_write_queue( write_end );
     set_error( STATUS_PENDING );
 
-    if (!blocking)
+    if (!async_is_blocking( async ))
     {
         struct iosb *iosb;
         iosb = async_get_iosb( async );




More information about the wine-cvs mailing list