Restore change after rebase

This commit is contained in:
Alistair Leslie-Hughes 2021-10-12 10:36:26 +11:00
parent c7f16e15e7
commit 56a387bf1d

View File

@ -1,4 +1,4 @@
From bc78e23a57da5470ed44b72b2d4112583ea236d1 Mon Sep 17 00:00:00 2001
From 670ee9563c1021c05993ef8525a4661daa01d3dd Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 8 Jun 2018 21:01:24 -0500
Subject: [PATCH] server: Create eventfd file descriptors for event objects.
@ -9,8 +9,8 @@ This lets system processes shut down.
---
server/esync.c | 8 ++++++++
server/esync.h | 1 +
server/event.c | 29 +++++++++++++++++++++++++++--
3 files changed, 36 insertions(+), 2 deletions(-)
server/event.c | 30 ++++++++++++++++++++++++++++--
3 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/server/esync.c b/server/esync.c
index 2b9307267f9..975e5d2ddd6 100644
@ -41,10 +41,18 @@ index 1e12560ddd6..fcbfd0989bb 100644
void esync_wake_up( struct object *obj );
+void esync_clear( int fd );
diff --git a/server/event.c b/server/event.c
index c727bfdd1ba..f1a88e3d23f 100644
index c727bfdd1ba..69126abc096 100644
--- a/server/event.c
+++ b/server/event.c
@@ -35,6 +35,7 @@
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <unistd.h>
#include <sys/types.h>
#include "ntstatus.h"
@@ -35,6 +36,7 @@
#include "thread.h"
#include "request.h"
#include "security.h"
@ -52,7 +60,7 @@ index c727bfdd1ba..f1a88e3d23f 100644
static const WCHAR event_name[] = {'E','v','e','n','t'};
@@ -56,13 +57,16 @@ struct event
@@ -56,13 +58,16 @@ struct event
struct list kernel_object; /* list of kernel object pointers */
int manual_reset; /* is it a manual reset event? */
int signaled; /* event has been signaled */
@ -69,7 +77,7 @@ index c727bfdd1ba..f1a88e3d23f 100644
static const struct object_ops event_ops =
{
@@ -72,7 +76,7 @@ static const struct object_ops event_ops =
@@ -72,7 +77,7 @@ static const struct object_ops event_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
event_signaled, /* signaled */
@ -78,7 +86,7 @@ index c727bfdd1ba..f1a88e3d23f 100644
event_satisfied, /* satisfied */
event_signal, /* signal */
no_get_fd, /* get_fd */
@@ -86,7 +90,7 @@ static const struct object_ops event_ops =
@@ -86,7 +91,7 @@ static const struct object_ops event_ops =
no_open_file, /* open_file */
event_get_kernel_obj_list, /* get_kernel_obj_list */
no_close_handle, /* close_handle */
@ -87,7 +95,7 @@ index c727bfdd1ba..f1a88e3d23f 100644
};
@@ -152,6 +156,9 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
@@ -152,6 +157,9 @@ struct event *create_event( struct object *root, const struct unicode_str *name,
list_init( &event->kernel_object );
event->manual_reset = manual_reset;
event->signaled = initial_state;
@ -97,7 +105,7 @@ index c727bfdd1ba..f1a88e3d23f 100644
}
}
return event;
@@ -180,6 +187,9 @@ void set_event( struct event *event )
@@ -180,6 +188,9 @@ void set_event( struct event *event )
void reset_event( struct event *event )
{
event->signaled = 0;
@ -107,7 +115,7 @@ index c727bfdd1ba..f1a88e3d23f 100644
}
static void event_dump( struct object *obj, int verbose )
@@ -197,6 +207,13 @@ static int event_signaled( struct object *obj, struct wait_queue_entry *entry )
@@ -197,6 +208,13 @@ static int event_signaled( struct object *obj, struct wait_queue_entry *entry )
return event->signaled;
}
@ -121,7 +129,7 @@ index c727bfdd1ba..f1a88e3d23f 100644
static void event_satisfied( struct object *obj, struct wait_queue_entry *entry )
{
struct event *event = (struct event *)obj;
@@ -225,6 +242,14 @@ static struct list *event_get_kernel_obj_list( struct object *obj )
@@ -225,6 +243,14 @@ static struct list *event_get_kernel_obj_list( struct object *obj )
return &event->kernel_object;
}