svn commit: r242365 - in stable/9: lib/libmemstat sys/vm
Matthew D Fleming
mdf at FreeBSD.org
Tue Oct 30 17:05:13 UTC 2012
Author: mdf
Date: Tue Oct 30 17:05:12 2012
New Revision: 242365
URL: http://svn.freebsd.org/changeset/base/242365
Log:
MFC r242152:
Const-ify the zone name argument to uma_zcreate(9).
Modified:
stable/9/lib/libmemstat/memstat_uma.c
stable/9/sys/vm/uma.h
stable/9/sys/vm/uma_core.c
stable/9/sys/vm/uma_int.h
Directory Properties:
stable/9/lib/ (props changed)
stable/9/lib/libmemstat/ (props changed)
stable/9/sys/ (props changed)
Modified: stable/9/lib/libmemstat/memstat_uma.c
==============================================================================
--- stable/9/lib/libmemstat/memstat_uma.c Tue Oct 30 16:56:16 2012 (r242364)
+++ stable/9/lib/libmemstat/memstat_uma.c Tue Oct 30 17:05:12 2012 (r242365)
@@ -254,7 +254,7 @@ kread(kvm_t *kvm, void *kvm_pointer, voi
}
static int
-kread_string(kvm_t *kvm, void *kvm_pointer, char *buffer, int buflen)
+kread_string(kvm_t *kvm, const void *kvm_pointer, char *buffer, int buflen)
{
ssize_t ret;
int i;
Modified: stable/9/sys/vm/uma.h
==============================================================================
--- stable/9/sys/vm/uma.h Tue Oct 30 16:56:16 2012 (r242364)
+++ stable/9/sys/vm/uma.h Tue Oct 30 17:05:12 2012 (r242365)
@@ -165,9 +165,9 @@ typedef void (*uma_fini)(void *mem, int
* A pointer to a structure which is intended to be opaque to users of
* the interface. The value may be null if the wait flag is not set.
*/
-uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
- uma_init uminit, uma_fini fini, int align,
- u_int32_t flags);
+uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor,
+ uma_dtor dtor, uma_init uminit, uma_fini fini,
+ int align, u_int32_t flags);
/*
* Create a secondary uma zone
Modified: stable/9/sys/vm/uma_core.c
==============================================================================
--- stable/9/sys/vm/uma_core.c Tue Oct 30 16:56:16 2012 (r242364)
+++ stable/9/sys/vm/uma_core.c Tue Oct 30 17:05:12 2012 (r242365)
@@ -153,7 +153,7 @@ static struct callout uma_callout;
* a special allocation function just for zones.
*/
struct uma_zctor_args {
- char *name;
+ const char *name;
size_t size;
uma_ctor ctor;
uma_dtor dtor;
@@ -1821,7 +1821,7 @@ uma_set_align(int align)
/* See uma.h */
uma_zone_t
-uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
+uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
uma_init uminit, uma_fini fini, int align, u_int32_t flags)
{
Modified: stable/9/sys/vm/uma_int.h
==============================================================================
--- stable/9/sys/vm/uma_int.h Tue Oct 30 16:56:16 2012 (r242364)
+++ stable/9/sys/vm/uma_int.h Tue Oct 30 17:05:12 2012 (r242365)
@@ -202,7 +202,7 @@ struct uma_keg {
struct mtx uk_lock; /* Lock for the keg */
struct uma_hash uk_hash;
- char *uk_name; /* Name of creating zone. */
+ const char *uk_name; /* Name of creating zone. */
LIST_HEAD(,uma_zone) uk_zones; /* Keg's zones */
LIST_HEAD(,uma_slab) uk_part_slab; /* partially allocated slabs */
LIST_HEAD(,uma_slab) uk_free_slab; /* empty slab list */
@@ -305,7 +305,7 @@ typedef struct uma_klink *uma_klink_t;
*
*/
struct uma_zone {
- char *uz_name; /* Text name of the zone */
+ const char *uz_name; /* Text name of the zone */
struct mtx *uz_lock; /* Lock for the zone (keg's lock) */
LIST_ENTRY(uma_zone) uz_link; /* List of all zones in keg */
More information about the svn-src-stable-9
mailing list