diff options
Diffstat (limited to 'usr/src/lib')
-rw-r--r-- | usr/src/lib/libumem/common/mapfile-vers | 4 | ||||
-rw-r--r-- | usr/src/lib/libumem/common/umem.c | 18 | ||||
-rw-r--r-- | usr/src/lib/libumem/common/umem.h | 4 |
3 files changed, 18 insertions, 8 deletions
diff --git a/usr/src/lib/libumem/common/mapfile-vers b/usr/src/lib/libumem/common/mapfile-vers index e95e666885..c2cdadf993 100644 --- a/usr/src/lib/libumem/common/mapfile-vers +++ b/usr/src/lib/libumem/common/mapfile-vers @@ -49,6 +49,10 @@ LOAD_SEGMENT umem { }; $endif +SYMBOL_VERSION ILLUMOS_0.1 { + global: + umem_setmtbf; +} SUNW_1.1; SYMBOL_VERSION SUNW_1.1 { global: diff --git a/usr/src/lib/libumem/common/umem.c b/usr/src/lib/libumem/common/umem.c index 7f31529852..598a45eb39 100644 --- a/usr/src/lib/libumem/common/umem.c +++ b/usr/src/lib/libumem/common/umem.c @@ -395,8 +395,8 @@ * umem_t that looks like: * * typedef struct { - * size_t tm_size; - * void *tm_roots[NTMEMBASE]; (Currently 16) + * size_t tm_size; + * void *tm_roots[NTMEMBASE]; (Currently 16) * } tmem_t; * * Each of the roots is treated as the head of a linked list. Each entry in the @@ -560,10 +560,10 @@ * * o. _tmem_get_base(void) * - * Returns the offset from the ulwp_t (curthread) to the tmem_t structure. - * This is a constant for all threads and is effectively a way to to do - * ::offsetof ulwp_t ul_tmem without having to know the specifics of the - * structure outside of libc. + * Returns the offset from the ulwp_t (curthread) to the tmem_t structure. + * This is a constant for all threads and is effectively a way to to do + * ::offsetof ulwp_t ul_tmem without having to know the specifics of the + * structure outside of libc. * * o. _tmem_get_nentries(void) * @@ -3560,3 +3560,9 @@ fail: (void) mutex_unlock(&umem_init_lock); return (0); } + +void +umem_setmtbf(uint32_t mtbf) +{ + umem_mtbf = mtbf; +} diff --git a/usr/src/lib/libumem/common/umem.h b/usr/src/lib/libumem/common/umem.h index f8dc475297..62297be431 100644 --- a/usr/src/lib/libumem/common/umem.h +++ b/usr/src/lib/libumem/common/umem.h @@ -27,8 +27,6 @@ #ifndef _UMEM_H #define _UMEM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/vmem.h> #include <stdlib.h> @@ -79,6 +77,8 @@ extern void umem_cache_free(umem_cache_t *, void *); extern void umem_reap(void); +extern void umem_setmtbf(uint32_t); + #ifdef __cplusplus } #endif |