From cdcb20369193d184aa54b9cfafb043214f67af45 Mon Sep 17 00:00:00 2001 From: Mike McCormack <mike@codeweavers.com> Date: Tue, 14 Jun 2005 11:40:40 +0000 Subject: [PATCH] Call remove_process_locks when a process ends, fix declarations. --- server/file.h | 2 +- server/handle.h | 1 + server/process.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/file.h b/server/file.h index cc23a4aeb77..eed81d88274 100644 --- a/server/file.h +++ b/server/file.h @@ -59,7 +59,6 @@ extern int check_fd_events( struct fd *fd, int events ); extern void set_fd_events( struct fd *fd, int events ); extern obj_handle_t lock_fd( struct fd *fd, file_pos_t offset, file_pos_t count, int shared, int wait ); extern void unlock_fd( struct fd *fd, file_pos_t offset, file_pos_t count ); -extern int flush_cached_fd( struct process *process, obj_handle_t handle ); extern int default_fd_add_queue( struct object *obj, struct wait_queue_entry *entry ); extern void default_fd_remove_queue( struct object *obj, struct wait_queue_entry *entry ); @@ -73,6 +72,7 @@ extern int no_get_file_info( struct fd *fd ); extern void no_queue_async( struct fd *fd, void* apc, void* user, void* io_sb, int type, int count); extern void no_cancel_async( struct fd *fd ); extern void main_loop(void); +extern void remove_process_locks( struct process *process ); inline static struct fd *get_obj_fd( struct object *obj ) { return obj->ops->get_fd( obj ); } diff --git a/server/handle.h b/server/handle.h index 84faae1e517..94912584a8e 100644 --- a/server/handle.h +++ b/server/handle.h @@ -49,6 +49,7 @@ extern obj_handle_t find_inherited_handle( struct process *process, const struct extern struct handle_table *alloc_handle_table( struct process *process, int count ); extern struct handle_table *copy_handle_table( struct process *process, struct process *parent ); extern unsigned int get_handle_table_count( struct process *process); +extern int flush_cached_fd( struct process *process, obj_handle_t handle ); extern void close_global_handles(void); diff --git a/server/process.c b/server/process.c index 32d3be0c4b1..89153c76e33 100644 --- a/server/process.c +++ b/server/process.c @@ -424,6 +424,7 @@ static void process_destroy( struct object *obj ) assert( list_empty( &process->thread_list )); set_process_startup_state( process, STARTUP_ABORTED ); + remove_process_locks( process ); if (process->console) release_object( process->console ); if (process->parent) release_object( process->parent ); if (process->msg_fd) release_object( process->msg_fd ); -- GitLab