Commit f8e9cdca authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntdll: Remove no longer needed APC from async_fileio.

parent e2469b2c
...@@ -353,8 +353,6 @@ struct async_fileio ...@@ -353,8 +353,6 @@ struct async_fileio
async_callback_t *callback; /* must be the first field */ async_callback_t *callback; /* must be the first field */
struct async_fileio *next; struct async_fileio *next;
HANDLE handle; HANDLE handle;
PIO_APC_ROUTINE apc;
void *apc_arg;
}; };
struct async_fileio_read struct async_fileio_read
...@@ -394,8 +392,7 @@ static void release_fileio( struct async_fileio *io ) ...@@ -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, static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, HANDLE handle )
PIO_APC_ROUTINE apc, void *arg )
{ {
/* first free remaining previous fileinfos */ /* first free remaining previous fileinfos */
...@@ -412,8 +409,6 @@ static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, ...@@ -412,8 +409,6 @@ static struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback,
{ {
io->callback = callback; io->callback = callback;
io->handle = handle; io->handle = handle;
io->apc = apc;
io->apc_arg = arg;
} }
return io; return io;
} }
...@@ -570,7 +565,7 @@ static NTSTATUS server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE a ...@@ -570,7 +565,7 @@ static NTSTATUS server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE a
HANDLE wait_handle; HANDLE wait_handle;
ULONG options; 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; return STATUS_NO_MEMORY;
async->event = event; async->event = event;
...@@ -611,7 +606,7 @@ static NTSTATUS server_write_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ...@@ -611,7 +606,7 @@ static NTSTATUS server_write_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE
HANDLE wait_handle; HANDLE wait_handle;
ULONG options; 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; return STATUS_NO_MEMORY;
async->event = event; async->event = event;
...@@ -783,7 +778,7 @@ static NTSTATUS register_async_file_read( HANDLE handle, HANDLE event, ...@@ -783,7 +778,7 @@ static NTSTATUS register_async_file_read( HANDLE handle, HANDLE event,
struct async_fileio_read *fileio; struct async_fileio_read *fileio;
NTSTATUS status; 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; return STATUS_NO_MEMORY;
fileio->already = already; fileio->already = already;
...@@ -1337,7 +1332,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, ...@@ -1337,7 +1332,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
{ {
struct async_fileio_write *fileio; 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) if (!fileio)
{ {
status = STATUS_NO_MEMORY; status = STATUS_NO_MEMORY;
...@@ -1525,7 +1520,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event, ...@@ -1525,7 +1520,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event,
HANDLE wait_handle; HANDLE wait_handle;
ULONG options; 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; return STATUS_NO_MEMORY;
async->event = event; async->event = event;
async->buffer = out_buffer; async->buffer = out_buffer;
...@@ -1938,7 +1933,7 @@ NTSTATUS WINAPI NtNotifyChangeDirectoryFile( HANDLE handle, HANDLE event, PIO_AP ...@@ -1938,7 +1933,7 @@ NTSTATUS WINAPI NtNotifyChangeDirectoryFile( HANDLE handle, HANDLE event, PIO_AP
if (filter == 0 || (filter & ~FILE_NOTIFY_ALL)) return STATUS_INVALID_PARAMETER; 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]), 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; if (!fileio) return STATUS_NO_MEMORY;
fileio->buffer = buffer; fileio->buffer = buffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment