Rebase against 2d6b0b67d91b6433744ec859b10b8ee8eb4a37b3.

This commit is contained in:
Zebediah Figura
2021-02-10 19:09:42 -06:00
parent 6347bdd1fc
commit 41e15516bd
36 changed files with 318 additions and 1419 deletions

View File

@ -1,4 +1,4 @@
From d70b0135dbcaa414f1252b4d0a0d0389cb751e29 Mon Sep 17 00:00:00 2001
From 1a2cd66380cef9a1f8a7a03f98d5f7af7c889bea Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 7 Jul 2018 12:57:47 +0200
Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
@ -11,7 +11,7 @@ Subject: [PATCH] server: Create eventfd descriptors for pseudo-fd objects and
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/server/fd.c b/server/fd.c
index aa629ff1824..be05795f822 100644
index 38f3ab79226..252236fbb91 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -102,6 +102,7 @@
@ -22,7 +22,7 @@ index aa629ff1824..be05795f822 100644
#include "winternl.h"
#include "winioctl.h"
@@ -203,6 +204,7 @@ struct fd
@@ -205,6 +206,7 @@ struct 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 */
@ -30,7 +30,7 @@ index aa629ff1824..be05795f822 100644
};
static void fd_dump( struct object *obj, int verbose );
@@ -1593,6 +1595,9 @@ static void fd_destroy( struct object *obj )
@@ -1596,6 +1598,9 @@ static void fd_destroy( struct object *obj )
free( fd->unlink_name );
free( fd->unix_name );
}
@ -40,7 +40,7 @@ index aa629ff1824..be05795f822 100644
}
/* check if the desired access is possible without violating */
@@ -1708,6 +1713,7 @@ static struct fd *alloc_fd_object(void)
@@ -1713,6 +1718,7 @@ static struct fd *alloc_fd_object(void)
fd->poll_index = -1;
fd->completion = NULL;
fd->comp_flags = 0;
@ -48,7 +48,7 @@ index aa629ff1824..be05795f822 100644
init_async_queue( &fd->read_q );
init_async_queue( &fd->write_q );
init_async_queue( &fd->wait_q );
@@ -1746,11 +1752,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
@@ -1753,11 +1759,15 @@ struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *use
fd->completion = NULL;
fd->comp_flags = 0;
fd->no_fd_status = STATUS_BAD_DEVICE_TYPE;
@ -64,7 +64,7 @@ index aa629ff1824..be05795f822 100644
return fd;
}
@@ -2147,6 +2157,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
@@ -2202,6 +2212,9 @@ void set_fd_signaled( struct fd *fd, int signaled )
if (fd->comp_flags & FILE_SKIP_SET_EVENT_ON_HANDLE) return;
fd->signaled = signaled;
if (signaled) wake_up( fd->user, 0 );
@ -74,7 +74,7 @@ index aa629ff1824..be05795f822 100644
}
/* handler for close_handle that refuses to close fd-associated handles in other processes */
@@ -2178,6 +2191,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
@@ -2233,6 +2246,15 @@ int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry )
return ret;
}
@ -91,11 +91,11 @@ index aa629ff1824..be05795f822 100644
{
int events = 0;
diff --git a/server/file.h b/server/file.h
index 686bae084c5..dab6d1506c3 100644
index 3b70799a3ec..f332c685add 100644
--- a/server/file.h
+++ b/server/file.h
@@ -102,6 +102,7 @@ extern void set_fd_signaled( struct fd *fd, int signaled );
extern char *dup_fd_name( struct fd *root, const char *name );
@@ -104,6 +104,7 @@ extern char *dup_fd_name( struct fd *root, const char *name );
extern void get_nt_name( struct fd *fd, struct unicode_str *name );
extern int default_fd_signaled( struct object *obj, struct wait_queue_entry *entry );
+extern int default_fd_get_esync_fd( struct object *obj, enum esync_type *type );