server: Rename make_object_static() to make_object_permanent().

This makes it clear that it's the same as the OBJ_PERMANENT flag.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-09-23 15:26:10 +02:00
parent 82c84548eb
commit 25692223f1
7 changed files with 11 additions and 11 deletions

View File

@ -304,7 +304,7 @@ static struct atom_table *get_global_table( struct winstation *winstation, int c
else else
{ {
global_table = table; global_table = table;
make_object_static( &global_table->obj ); make_object_permanent( &global_table->obj );
} }
} }
else set_error( STATUS_OBJECT_NAME_NOT_FOUND ); else set_error( STATUS_OBJECT_NAME_NOT_FOUND );

View File

@ -298,7 +298,7 @@ static obj_handle_t alloc_global_handle_no_access_check( void *obj, unsigned int
{ {
if (!(global_table = alloc_handle_table( NULL, 0 ))) if (!(global_table = alloc_handle_table( NULL, 0 )))
return 0; return 0;
make_object_static( &global_table->obj ); make_object_permanent( &global_table->obj );
} }
return handle_local_to_global( alloc_entry( global_table, obj, access )); return handle_local_to_global( alloc_entry( global_table, obj, access ));
} }

View File

@ -347,7 +347,7 @@ void *create_named_object( struct object *parent, const struct object_ops *ops,
done: done:
if (attributes & OBJ_PERMANENT) if (attributes & OBJ_PERMANENT)
{ {
make_object_static( new_obj ); make_object_permanent( new_obj );
grab_object( new_obj ); grab_object( new_obj );
} }
return new_obj; return new_obj;
@ -406,8 +406,8 @@ void unlink_named_object( struct object *obj )
free( name_ptr ); free( name_ptr );
} }
/* mark an object as being stored statically, i.e. only released at shutdown */ /* mark an object as being permanent, i.e. only released at shutdown */
void make_object_static( struct object *obj ) void make_object_permanent( struct object *obj )
{ {
obj->is_permanent = 1; obj->is_permanent = 1;
#ifdef DEBUG_OBJECTS #ifdef DEBUG_OBJECTS
@ -416,7 +416,7 @@ void make_object_static( struct object *obj )
#endif #endif
} }
/* mark an object as no longer static */ /* mark an object as no longer permanent */
void make_object_temporary( struct object *obj ) void make_object_temporary( struct object *obj )
{ {
obj->is_permanent = 0; obj->is_permanent = 0;

View File

@ -145,7 +145,7 @@ extern void *create_named_object( struct object *parent, const struct object_ops
extern void *open_named_object( struct object *parent, const struct object_ops *ops, extern void *open_named_object( struct object *parent, const struct object_ops *ops,
const struct unicode_str *name, unsigned int attributes ); const struct unicode_str *name, unsigned int attributes );
extern void unlink_named_object( struct object *obj ); extern void unlink_named_object( struct object *obj );
extern void make_object_static( struct object *obj ); extern void make_object_permanent( struct object *obj );
extern void make_object_temporary( struct object *obj ); extern void make_object_temporary( struct object *obj );
extern struct namespace *create_namespace( unsigned int hash_size ); extern struct namespace *create_namespace( unsigned int hash_size );
extern void free_kernel_objects( struct object *obj ); extern void free_kernel_objects( struct object *obj );

View File

@ -1742,7 +1742,7 @@ static int load_init_registry_from_file( const char *filename, struct key *key )
save_branch_info[save_branch_count].path = filename; save_branch_info[save_branch_count].path = filename;
save_branch_info[save_branch_count++].key = (struct key *)grab_object( key ); save_branch_info[save_branch_count++].key = (struct key *)grab_object( key );
make_object_static( &key->obj ); make_object_permanent( &key->obj );
return (f != NULL); return (f != NULL);
} }
@ -1813,7 +1813,7 @@ void init_registry(void)
/* create the root key */ /* create the root key */
root_key = alloc_key( &root_name, current_time ); root_key = alloc_key( &root_name, current_time );
assert( root_key ); assert( root_key );
make_object_static( &root_key->obj ); make_object_permanent( &root_key->obj );
/* load system.reg into Registry\Machine */ /* load system.reg into Registry\Machine */

View File

@ -871,7 +871,7 @@ static void acquire_lock(void)
!(master_socket->fd = create_anonymous_fd( &master_socket_fd_ops, fd, &master_socket->obj, 0 ))) !(master_socket->fd = create_anonymous_fd( &master_socket_fd_ops, fd, &master_socket->obj, 0 )))
fatal_error( "out of memory\n" ); fatal_error( "out of memory\n" );
set_fd_events( master_socket->fd, POLLIN ); set_fd_events( master_socket->fd, POLLIN );
make_object_static( &master_socket->obj ); make_object_permanent( &master_socket->obj );
} }
/* open the master server socket and start waiting for new clients */ /* open the master server socket and start waiting for new clients */

View File

@ -127,7 +127,7 @@ static struct handler *create_handler( signal_callback callback )
return NULL; return NULL;
} }
set_fd_events( handler->fd, POLLIN ); set_fd_events( handler->fd, POLLIN );
make_object_static( &handler->obj ); make_object_permanent( &handler->obj );
return handler; return handler;
} }