You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against 4e2c0444121d341bac9bc841ab6662fceeb42c1a.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
From 616d2000a5dd5f9e68fe873a368e72dda49d6953 Mon Sep 17 00:00:00 2001
|
||||
From 9eb1c0e197164120ed601bd64e9339c0f5ea8acd Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 15 Oct 2016 19:50:46 +0200
|
||||
Subject: ntdll: Implement FileIoCompletionNotificationInformation info class.
|
||||
@ -43,10 +43,10 @@ index 3e93b0dfd78..f4e63bcaae6 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index fd7f3dd955a..00131f11cf7 100644
|
||||
index a82f081ee23..3c5d4e96876 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -2802,6 +2802,23 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
|
||||
@@ -2857,6 +2857,23 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
|
||||
io->u.Status = STATUS_INVALID_PARAMETER_3;
|
||||
break;
|
||||
|
||||
@ -71,10 +71,10 @@ index fd7f3dd955a..00131f11cf7 100644
|
||||
io->u.Status = STATUS_INVALID_INFO_CLASS;
|
||||
break;
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 5053eb123d1..bf45cbfa522 100644
|
||||
index c0f4efc6c3c..08ac313c1a3 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -3277,12 +3277,11 @@ static void test_file_completion_information(void)
|
||||
@@ -3082,12 +3082,11 @@ static void test_file_completion_information(void)
|
||||
if (!(h = create_temp_file(0))) return;
|
||||
|
||||
status = pNtSetInformationFile(h, &io, &info, sizeof(info) - 1, FileIoCompletionNotificationInformation);
|
||||
@ -89,34 +89,34 @@ index 5053eb123d1..bf45cbfa522 100644
|
||||
return;
|
||||
}
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 732a5b798f3..8ff5f9801ad 100644
|
||||
index 9322e2c1c15..4cb46058b64 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -194,6 +194,7 @@ struct fd
|
||||
struct async_queue *wait_q; /* other async waiters of this fd */
|
||||
struct async_queue wait_q; /* other async waiters of this fd */
|
||||
struct completion *completion; /* completion object attached to this fd */
|
||||
apc_param_t comp_key; /* completion key to set in completion events */
|
||||
+ unsigned int comp_flags; /* completion flags */
|
||||
};
|
||||
|
||||
static void fd_dump( struct object *obj, int verbose );
|
||||
@@ -1607,6 +1608,7 @@ static struct fd *alloc_fd_object(void)
|
||||
fd->write_q = NULL;
|
||||
fd->wait_q = NULL;
|
||||
@@ -1604,6 +1605,7 @@ static struct fd *alloc_fd_object(void)
|
||||
fd->fs_locks = 1;
|
||||
fd->poll_index = -1;
|
||||
fd->completion = NULL;
|
||||
+ fd->comp_flags = 0;
|
||||
list_init( &fd->inode_entry );
|
||||
list_init( &fd->locks );
|
||||
|
||||
@@ -1642,6 +1644,7 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
fd->write_q = NULL;
|
||||
fd->wait_q = NULL;
|
||||
init_async_queue( &fd->read_q );
|
||||
init_async_queue( &fd->write_q );
|
||||
init_async_queue( &fd->wait_q );
|
||||
@@ -1639,6 +1641,7 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
|
||||
fd->fs_locks = 0;
|
||||
fd->poll_index = -1;
|
||||
fd->completion = NULL;
|
||||
+ fd->comp_flags = 0;
|
||||
fd->no_fd_status = STATUS_BAD_DEVICE_TYPE;
|
||||
list_init( &fd->inode_entry );
|
||||
list_init( &fd->locks );
|
||||
@@ -2369,6 +2372,7 @@ void fd_copy_completion( struct fd *src, struct fd *dst )
|
||||
init_async_queue( &fd->read_q );
|
||||
init_async_queue( &fd->write_q );
|
||||
@@ -2360,6 +2363,7 @@ void fd_copy_completion( struct fd *src, struct fd *dst )
|
||||
{
|
||||
assert( !dst->completion );
|
||||
dst->completion = fd_get_completion( src, &dst->comp_key );
|
||||
@ -124,7 +124,7 @@ index 732a5b798f3..8ff5f9801ad 100644
|
||||
}
|
||||
|
||||
/* flush a file buffers */
|
||||
@@ -2539,12 +2543,29 @@ DECL_HANDLER(add_fd_completion)
|
||||
@@ -2543,12 +2547,29 @@ DECL_HANDLER(add_fd_completion)
|
||||
struct fd *fd = get_handle_fd_obj( current->process, req->handle, 0 );
|
||||
if (fd)
|
||||
{
|
||||
@ -156,10 +156,10 @@ index 732a5b798f3..8ff5f9801ad 100644
|
||||
DECL_HANDLER(set_fd_disp_info)
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 60865a6ffc2..73fef6fade6 100644
|
||||
index 1f88c6a5c86..3646b9a4349 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3657,6 +3657,14 @@ struct handle_info
|
||||
@@ -3651,6 +3651,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@ -175,5 +175,5 @@ index 60865a6ffc2..73fef6fade6 100644
|
||||
@REQ(set_fd_disp_info)
|
||||
obj_handle_t handle; /* handle to a file or directory */
|
||||
--
|
||||
2.11.0
|
||||
2.13.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9c2428d179473d7bd8e383132e408edd330f8e80 Mon Sep 17 00:00:00 2001
|
||||
From fcc8dc4d71db746ccc4b974eae02edd222d23313 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 9 Apr 2017 03:13:25 +0200
|
||||
Subject: server: Skip async completion when possible.
|
||||
@ -25,26 +25,26 @@ index bda9a144ade..aa240edea21 100644
|
||||
|
||||
CloseHandle(ov.hEvent);
|
||||
diff --git a/server/async.c b/server/async.c
|
||||
index 3a83a6302bf..770ed493819 100644
|
||||
index 020580728de..08daa9a2304 100644
|
||||
--- a/server/async.c
|
||||
+++ b/server/async.c
|
||||
@@ -51,6 +51,7 @@ struct async
|
||||
struct iosb *iosb; /* I/O status block */
|
||||
obj_handle_t wait_handle; /* pre-allocated wait handle */
|
||||
@@ -53,6 +53,7 @@ struct async
|
||||
int direct_result; /* a flag if we're passing result directly from request instead of APC */
|
||||
struct completion *completion; /* completion associated with fd */
|
||||
apc_param_t comp_key; /* completion key associated with fd */
|
||||
+ unsigned int comp_flags; /* completion flags */
|
||||
};
|
||||
|
||||
static void async_dump( struct object *obj, int verbose );
|
||||
@@ -294,6 +295,7 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
|
||||
async->signaled = 0;
|
||||
@@ -237,6 +238,7 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
|
||||
async->wait_handle = 0;
|
||||
async->direct_result = 0;
|
||||
async->completion = NULL;
|
||||
+ async->comp_flags = 0;
|
||||
|
||||
if (iosb) async->iosb = (struct iosb *)grab_object( iosb );
|
||||
else async->iosb = NULL;
|
||||
@@ -306,7 +308,7 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
|
||||
@@ -249,7 +251,7 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da
|
||||
|
||||
/* create an async associated with iosb for async-based requests
|
||||
* returned async must be passed to async_handoff */
|
||||
@ -53,7 +53,7 @@ index 3a83a6302bf..770ed493819 100644
|
||||
{
|
||||
struct async *async;
|
||||
struct iosb *iosb;
|
||||
@@ -324,6 +326,7 @@ struct async *create_request_async( struct fd *fd, const async_data_t *data )
|
||||
@@ -267,6 +269,7 @@ struct async *create_request_async( struct fd *fd, const async_data_t *data )
|
||||
return NULL;
|
||||
}
|
||||
async->direct_result = 1;
|
||||
@ -61,7 +61,7 @@ index 3a83a6302bf..770ed493819 100644
|
||||
}
|
||||
return async;
|
||||
}
|
||||
@@ -438,8 +441,11 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
|
||||
@@ -368,8 +371,11 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
|
||||
data.user.args[2] = 0;
|
||||
thread_queue_apc( async->thread, NULL, &data );
|
||||
}
|
||||
@ -75,10 +75,10 @@ index 3a83a6302bf..770ed493819 100644
|
||||
if (async->event) set_event( async->event );
|
||||
else if (async->fd) set_fd_signaled( async->fd, 1 );
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index 6747aaabdb4..2a8ecb12b8e 100644
|
||||
index 18b1e04d448..d8f066c7219 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -2377,7 +2377,7 @@ DECL_HANDLER(flush)
|
||||
@@ -2374,7 +2374,7 @@ DECL_HANDLER(flush)
|
||||
|
||||
if (!fd) return;
|
||||
|
||||
@ -87,7 +87,7 @@ index 6747aaabdb4..2a8ecb12b8e 100644
|
||||
{
|
||||
reply->event = async_handoff( async, fd->fd_ops->flush( fd, async ), NULL );
|
||||
release_object( async );
|
||||
@@ -2452,7 +2452,7 @@ DECL_HANDLER(read)
|
||||
@@ -2449,7 +2449,7 @@ DECL_HANDLER(read)
|
||||
|
||||
if (!fd) return;
|
||||
|
||||
@ -96,7 +96,7 @@ index 6747aaabdb4..2a8ecb12b8e 100644
|
||||
{
|
||||
reply->wait = async_handoff( async, fd->fd_ops->read( fd, async, req->pos ), NULL );
|
||||
reply->options = fd->options;
|
||||
@@ -2469,7 +2469,7 @@ DECL_HANDLER(write)
|
||||
@@ -2466,7 +2466,7 @@ DECL_HANDLER(write)
|
||||
|
||||
if (!fd) return;
|
||||
|
||||
@ -105,7 +105,7 @@ index 6747aaabdb4..2a8ecb12b8e 100644
|
||||
{
|
||||
reply->wait = async_handoff( async, fd->fd_ops->write( fd, async, req->pos ), &reply->size );
|
||||
reply->options = fd->options;
|
||||
@@ -2487,7 +2487,7 @@ DECL_HANDLER(ioctl)
|
||||
@@ -2484,7 +2484,7 @@ DECL_HANDLER(ioctl)
|
||||
|
||||
if (!fd) return;
|
||||
|
||||
@ -115,11 +115,11 @@ index 6747aaabdb4..2a8ecb12b8e 100644
|
||||
reply->wait = async_handoff( async, fd->fd_ops->ioctl( fd, req->code, async ), NULL );
|
||||
reply->options = fd->options;
|
||||
diff --git a/server/file.h b/server/file.h
|
||||
index 386f76c4be2..1c9c66fdad1 100644
|
||||
index fa41654e6b6..33b42554534 100644
|
||||
--- a/server/file.h
|
||||
+++ b/server/file.h
|
||||
@@ -176,7 +176,7 @@ extern struct object *create_serial( struct fd *fd );
|
||||
extern struct async_queue *create_async_queue( struct fd *fd );
|
||||
@@ -180,7 +180,7 @@ extern struct object *create_serial( struct fd *fd );
|
||||
/* async I/O functions */
|
||||
extern void free_async_queue( struct async_queue *queue );
|
||||
extern struct async *create_async( struct fd *fd, struct thread *thread, const async_data_t *data, struct iosb *iosb );
|
||||
-extern struct async *create_request_async( struct fd *fd, const async_data_t *data );
|
||||
|
Reference in New Issue
Block a user