[PATCH 3/5] server: Allow creating process kernel objects.
Derek Lesho
dereklesho52 at gmail.com
Wed Apr 17 14:41:16 CDT 2019
Signed-off-by: Derek Lesho <dereklesho52 at Gmail.com>
---
server/process.c | 10 +++++++++-
server/process.h | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/server/process.c b/server/process.c
index 473d3b1a27..f9e7955ce1 100644
--- a/server/process.c
+++ b/server/process.c
@@ -66,6 +66,7 @@ static unsigned int process_map_access( struct object *obj, unsigned int access
static void process_poll_event( struct fd *fd, int event );
static void process_destroy( struct object *obj );
static void terminate_process( struct process *process, struct thread *skip, int exit_code );
+static struct list *process_get_kernel_obj_list( struct object *obj );
static const struct object_ops process_ops =
{
@@ -85,7 +86,7 @@ static const struct object_ops process_ops =
no_link_name, /* link_name */
NULL, /* unlink_name */
no_open_file, /* open_file */
- no_kernel_obj_list, /* get_kernel_obj_list */
+ process_get_kernel_obj_list, /* get_kernel_obj_list */
no_close_handle, /* close_handle */
process_destroy /* destroy */
};
@@ -526,6 +527,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
process->trace_data = 0;
process->rawinput_mouse = NULL;
process->rawinput_kbd = NULL;
+ list_init( &process->kernel_object );
list_init( &process->thread_list );
list_init( &process->locks );
list_init( &process->asyncs );
@@ -661,6 +663,12 @@ static unsigned int process_map_access( struct object *obj, unsigned int access
return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
}
+static struct list *process_get_kernel_obj_list( struct object *obj )
+{
+ struct process *process = (struct process *)obj;
+ return &process->kernel_object;
+}
+
static void process_poll_event( struct fd *fd, int event )
{
struct process *process = get_fd_user( fd );
diff --git a/server/process.h b/server/process.h
index 4566a04b48..d9d29f0242 100644
--- a/server/process.h
+++ b/server/process.h
@@ -96,6 +96,7 @@ struct process
struct list rawinput_devices;/* list of registered rawinput devices */
const struct rawinput_device *rawinput_mouse; /* rawinput mouse device, if any */
const struct rawinput_device *rawinput_kbd; /* rawinput keyboard device, if any */
+ struct list kernel_object; /* list of kernel object pointers */
};
struct process_snapshot
--
2.20.1
More information about the wine-devel
mailing list