[PATCH 03/10] server: Allow creating process kernel objects.
Derek Lesho
dereklesho52 at gmail.com
Tue Apr 9 13:10:36 CDT 2019
Signed-off-by: Derek Lesho <dereklesho52 at Gmail.com>
---
server/process.c | 46 +++++++++++++++++++++++++++-------------------
server/process.h | 1 +
2 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/server/process.c b/server/process.c
index 473d3b1a27..520edaf0d8 100644
--- a/server/process.c
+++ b/server/process.c
@@ -66,28 +66,29 @@ 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_object_list( struct object *obj );
static const struct object_ops process_ops =
{
- sizeof(struct process), /* size */
- process_dump, /* dump */
- process_get_type, /* get_type */
- add_queue, /* add_queue */
- remove_queue, /* remove_queue */
- process_signaled, /* signaled */
- no_satisfied, /* satisfied */
- no_signal, /* signal */
- no_get_fd, /* get_fd */
- process_map_access, /* map_access */
- default_get_sd, /* get_sd */
- default_set_sd, /* set_sd */
- no_lookup_name, /* lookup_name */
- no_link_name, /* link_name */
- NULL, /* unlink_name */
- no_open_file, /* open_file */
- no_kernel_obj_list, /* get_kernel_obj_list */
- no_close_handle, /* close_handle */
- process_destroy /* destroy */
+ sizeof(struct process), /* size */
+ process_dump, /* dump */
+ process_get_type, /* get_type */
+ add_queue, /* add_queue */
+ remove_queue, /* remove_queue */
+ process_signaled, /* signaled */
+ no_satisfied, /* satisfied */
+ no_signal, /* signal */
+ no_get_fd, /* get_fd */
+ process_map_access, /* map_access */
+ default_get_sd, /* get_sd */
+ default_set_sd, /* set_sd */
+ no_lookup_name, /* lookup_name */
+ no_link_name, /* link_name */
+ NULL, /* unlink_name */
+ no_open_file, /* open_file */
+ process_get_kernel_object_list, /* get_kernel_obj_list */
+ no_close_handle, /* close_handle */
+ process_destroy /* destroy */
};
static const struct fd_ops process_fd_ops =
@@ -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_object_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