Jacek Caban : ntdll: Remove no longer needed APC from async_fileio.

Alexandre Julliard julliard at winehq.org
Tue Apr 11 15:31:04 CDT 2017


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Apr 10 13:21:56 2017 +0200

ntdll: Remove no longer needed APC from async_fileio.

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

---

 dlls/ntdll/file.c | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 42979d5..264ad65 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -353,8 +353,6 @@ struct async_fileio
     async_callback_t    *callback; /* must be the first field */
     struct async_fileio *next;
     HANDLE               handle;
-    PIO_APC_ROUTINE      apc;
-    void                *apc_arg;
 };
 
 struct async_fileio_read
@@ -394,8 +392,7 @@ static void release_fileio( struct async_fileio *io )
     }
 }
 
-static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, HANDLE handle,
-                                          PIO_APC_ROUTINE apc, void *arg )
+static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, HANDLE handle )
 {
     /* first free remaining previous fileinfos */
 
@@ -412,8 +409,6 @@ static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback,
     {
         io->callback = callback;
         io->handle   = handle;
-        io->apc      = apc;
-        io->apc_arg  = arg;
     }
     return io;
 }
@@ -570,7 +565,7 @@ static NTSTATUS server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE a
     HANDLE wait_handle;
     ULONG options;
 
-    if (!(async = (struct async_irp *)alloc_fileio( sizeof(*async), irp_completion, handle, apc, apc_context )))
+    if (!(async = (struct async_irp *)alloc_fileio( sizeof(*async), irp_completion, handle )))
         return STATUS_NO_MEMORY;
 
     async->event   = event;
@@ -611,7 +606,7 @@ static NTSTATUS server_write_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE
     HANDLE wait_handle;
     ULONG options;
 
-    if (!(async = (struct async_irp *)alloc_fileio( sizeof(*async), irp_completion, handle, apc, apc_context )))
+    if (!(async = (struct async_irp *)alloc_fileio( sizeof(*async), irp_completion, handle )))
         return STATUS_NO_MEMORY;
 
     async->event   = event;
@@ -783,7 +778,7 @@ static NTSTATUS register_async_file_read( HANDLE handle, HANDLE event,
     struct async_fileio_read *fileio;
     NTSTATUS status;
 
-    if (!(fileio = (struct async_fileio_read *)alloc_fileio( sizeof(*fileio), FILE_AsyncReadService, handle, apc, apc_user )))
+    if (!(fileio = (struct async_fileio_read *)alloc_fileio( sizeof(*fileio), FILE_AsyncReadService, handle )))
         return STATUS_NO_MEMORY;
 
     fileio->already = already;
@@ -1337,7 +1332,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
         {
             struct async_fileio_write *fileio;
 
-            fileio = (struct async_fileio_write *)alloc_fileio( sizeof(*fileio), FILE_AsyncWriteService, hFile, apc, apc_user );
+            fileio = (struct async_fileio_write *)alloc_fileio( sizeof(*fileio), FILE_AsyncWriteService, hFile );
             if (!fileio)
             {
                 status = STATUS_NO_MEMORY;
@@ -1525,7 +1520,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event,
     HANDLE wait_handle;
     ULONG options;
 
-    if (!(async = (struct async_irp *)alloc_fileio( sizeof(*async), irp_completion, handle, apc, apc_context )))
+    if (!(async = (struct async_irp *)alloc_fileio( sizeof(*async), irp_completion, handle )))
         return STATUS_NO_MEMORY;
     async->event   = event;
     async->buffer  = out_buffer;
@@ -1938,7 +1933,7 @@ NTSTATUS WINAPI NtNotifyChangeDirectoryFile( HANDLE handle, HANDLE event, PIO_AP
     if (filter == 0 || (filter & ~FILE_NOTIFY_ALL)) return STATUS_INVALID_PARAMETER;
 
     fileio = (struct read_changes_fileio *)alloc_fileio( offsetof(struct read_changes_fileio, data[size]),
-                                                         read_changes_apc, handle, apc, apc_context );
+                                                         read_changes_apc, handle );
     if (!fileio) return STATUS_NO_MEMORY;
 
     fileio->buffer      = buffer;




More information about the wine-cvs mailing list