Increase the flags field for kegs from a 16 to a 32 bit value;

we have exhausted all 16 flags.
This commit is contained in:
Mike Silbersack 2005-07-16 02:23:41 +00:00
parent d144359bde
commit 2018f30c01
3 changed files with 12 additions and 12 deletions

View File

@ -165,7 +165,7 @@ typedef void (*uma_fini)(void *mem, int size);
*/
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_int16_t flags);
u_int32_t flags);
/*
* Create a secondary uma zone
@ -206,7 +206,7 @@ uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
* Definitions for uma_zcreate flags
*
* These flags share space with UMA_ZFLAGs in uma_int.h. Be careful not to
* overlap when adding new features. 0xf000 is in use by uma_int.h.
* overlap when adding new features. 0xf0000000 is in use by uma_int.h.
*/
#define UMA_ZONE_PAGEABLE 0x0001 /* Return items not fully backed by
physical memory XXX Not yet */

View File

@ -155,7 +155,7 @@ struct uma_zctor_args {
uma_fini fini;
uma_keg_t keg;
int align;
u_int16_t flags;
u_int32_t flags;
};
struct uma_kctor_args {
@ -164,7 +164,7 @@ struct uma_kctor_args {
uma_init uminit;
uma_fini fini;
int align;
u_int16_t flags;
u_int32_t flags;
};
struct uma_bucket_zone {
@ -236,7 +236,7 @@ static uma_slab_t uma_zone_slab(uma_zone_t zone, int flags);
static void *uma_slab_alloc(uma_zone_t zone, uma_slab_t slab);
static void zone_drain(uma_zone_t);
static uma_zone_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit,
uma_fini fini, int align, u_int16_t flags);
uma_fini fini, int align, u_int32_t flags);
void uma_print_zone(uma_zone_t);
void uma_print_stats(void);
@ -1713,7 +1713,7 @@ uma_startup3(void)
static uma_zone_t
uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini,
int align, u_int16_t flags)
int align, u_int32_t flags)
{
struct uma_kctor_args args;
@ -1729,7 +1729,7 @@ uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini,
/* See uma.h */
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_int16_t flags)
uma_init uminit, uma_fini fini, int align, u_int32_t flags)
{
struct uma_zctor_args args;

View File

@ -219,7 +219,7 @@ struct uma_keg {
u_int16_t uk_pgoff; /* Offset to uma_slab struct */
u_int16_t uk_ppera; /* pages per allocation from backend */
u_int16_t uk_ipers; /* Items per slab */
u_int16_t uk_flags; /* Internal flags */
u_int32_t uk_flags; /* Internal flags */
};
/* Simpler reference to uma_keg for internal use. */
@ -319,10 +319,10 @@ struct uma_zone {
/*
* These flags must not overlap with the UMA_ZONE flags specified in uma.h.
*/
#define UMA_ZFLAG_PRIVALLOC 0x1000 /* Use uz_allocf. */
#define UMA_ZFLAG_INTERNAL 0x2000 /* No offpage no PCPU. */
#define UMA_ZFLAG_FULL 0x4000 /* Reached uz_maxpages */
#define UMA_ZFLAG_CACHEONLY 0x8000 /* Don't ask VM for buckets. */
#define UMA_ZFLAG_PRIVALLOC 0x10000000 /* Use uz_allocf. */
#define UMA_ZFLAG_INTERNAL 0x20000000 /* No offpage no PCPU. */
#define UMA_ZFLAG_FULL 0x40000000 /* Reached uz_maxpages */
#define UMA_ZFLAG_CACHEONLY 0x80000000 /* Don't ask VM for buckets. */
/* Internal prototypes */
static __inline uma_slab_t hash_sfind(struct uma_hash *hash, u_int8_t *data);