server: Allow creating process kernel objects.

Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Derek Lesho 2019-04-19 18:24:30 +02:00 committed by Alexandre Julliard
parent 7498c15b0d
commit f534fbd3e3
2 changed files with 10 additions and 1 deletions

View File

@ -64,6 +64,7 @@ static struct object_type *process_get_type( struct object *obj );
static int process_signaled( struct object *obj, struct wait_queue_entry *entry );
static unsigned int process_map_access( struct object *obj, unsigned int access );
static void process_poll_event( struct fd *fd, int event );
static struct list *process_get_kernel_obj_list( struct object *obj );
static void process_destroy( struct object *obj );
static void terminate_process( struct process *process, struct thread *skip, int exit_code );
@ -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 );

View File

@ -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