server: New scheme for cleaning up objects on server exit.
Objects stored in static variables can now be marked when they are
created and are automatically cleaned up on exit. This avoids having
to export a bunch of close_* functions.
diff --git a/server/handle.c b/server/handle.c
index 375539f..088c4c1 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -247,6 +247,7 @@
{
if (!(global_table = (struct handle_table *)alloc_handle_table( NULL, 0 )))
return 0;
+ make_object_static( &global_table->obj );
}
return handle_local_to_global( alloc_entry( global_table, obj, access ));
}
@@ -359,16 +360,6 @@
return 1;
}
-/* close all the global handles */
-void close_global_handles(void)
-{
- if (global_table)
- {
- release_object( global_table );
- global_table = NULL;
- }
-}
-
/* retrieve the object corresponding to one of the magic pseudo-handles */
static inline struct object *get_magic_handle( obj_handle_t handle )
{