summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-06-18 12:51:00 +0100
committerJosé Fonseca <[email protected]>2009-06-18 14:54:08 +0100
commit2af0173e9e4eefe910c6011038e7346091a9b2a4 (patch)
tree8ea0482b0677bd241386865bacb25db7e8dc67cc /src/gallium
parent42882897c67f6c74e67e120e946a95929e6c2065 (diff)
pipebuffer: Use a type consistently for sizes/offsets.
Avoids warnings on 64bit builds. Use regular unsigned since that's what gallium expects, but use a typedef to facilitate possible changes in the future.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer.h14
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c6
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c6
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr.h20
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c8
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c30
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c2
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c24
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c6
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c20
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c36
12 files changed, 90 insertions, 84 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer.h b/src/gallium/auxiliary/pipebuffer/pb_buffer.h
index 92b6fd00564..2590546cb4a 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer.h
@@ -72,6 +72,12 @@ struct pb_desc
/**
+ * Size. Regular (32bit) unsigned for now.
+ */
+typedef unsigned pb_size;
+
+
+/**
* Base class for all pb_* buffers.
*/
struct pb_buffer
@@ -126,7 +132,7 @@ struct pb_vtbl
*/
void (*get_base_buffer)( struct pb_buffer *buf,
struct pb_buffer **base_buf,
- unsigned *offset );
+ pb_size *offset );
};
@@ -177,7 +183,7 @@ pb_unmap(struct pb_buffer *buf)
static INLINE void
pb_get_base_buffer( struct pb_buffer *buf,
struct pb_buffer **base_buf,
- unsigned *offset )
+ pb_size *offset )
{
assert(buf);
if(!buf) {
@@ -241,7 +247,7 @@ pb_reference(struct pb_buffer **dst,
* the requested or not.
*/
static INLINE boolean
-pb_check_alignment(size_t requested, size_t provided)
+pb_check_alignment(pb_size requested, pb_size provided)
{
if(!requested)
return TRUE;
@@ -269,7 +275,7 @@ pb_check_usage(unsigned requested, unsigned provided)
* hardware.
*/
struct pb_buffer *
-pb_malloc_buffer_create(size_t size,
+pb_malloc_buffer_create(pb_size size,
const struct pb_desc *desc);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index 4698efa69cf..109ac7c9d63 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -65,11 +65,11 @@ struct fenced_buffer_list
struct pb_fence_ops *ops;
- size_t numDelayed;
+ pb_size numDelayed;
struct list_head delayed;
#ifdef DEBUG
- size_t numUnfenced;
+ pb_size numUnfenced;
struct list_head unfenced;
#endif
};
@@ -433,7 +433,7 @@ fenced_buffer_fence(struct pb_buffer *buf,
static void
fenced_buffer_get_base_buffer(struct pb_buffer *buf,
struct pb_buffer **base_buf,
- unsigned *offset)
+ pb_size *offset)
{
struct fenced_buffer *fenced_buf = fenced_buffer(buf);
pb_get_base_buffer(fenced_buf->buffer, base_buf, offset);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
index 689fd74771f..0760d607161 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
@@ -102,7 +102,7 @@ malloc_buffer_fence(struct pb_buffer *buf,
static void
malloc_buffer_get_base_buffer(struct pb_buffer *buf,
struct pb_buffer **base_buf,
- unsigned *offset)
+ pb_size *offset)
{
*base_buf = buf;
*offset = 0;
@@ -121,7 +121,7 @@ malloc_buffer_vtbl = {
struct pb_buffer *
-pb_malloc_buffer_create(size_t size,
+pb_malloc_buffer_create(pb_size size,
const struct pb_desc *desc)
{
struct malloc_buffer *buf;
@@ -150,7 +150,7 @@ pb_malloc_buffer_create(size_t size,
static struct pb_buffer *
pb_malloc_bufmgr_create_buffer(struct pb_manager *mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
return pb_malloc_buffer_create(size, desc);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
index 74077f82774..39ab8e722c1 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
@@ -73,7 +73,7 @@ struct pb_manager
struct pb_buffer *
(*create_buffer)( struct pb_manager *mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc);
/**
@@ -106,7 +106,7 @@ pb_malloc_bufmgr_create(void);
*/
struct pb_manager *
pool_bufmgr_create(struct pb_manager *provider,
- size_t n, size_t size,
+ pb_size n, pb_size size,
const struct pb_desc *desc);
@@ -119,7 +119,7 @@ pool_bufmgr_create(struct pb_manager *provider,
*/
struct pb_manager *
mm_bufmgr_create(struct pb_manager *provider,
- size_t size, size_t align2);
+ pb_size size, pb_size align2);
/**
* Same as mm_bufmgr_create.
@@ -128,7 +128,7 @@ mm_bufmgr_create(struct pb_manager *provider,
*/
struct pb_manager *
mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
- size_t size, size_t align2);
+ pb_size size, pb_size align2);
/**
@@ -136,8 +136,8 @@ mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
*/
struct pb_manager *
pb_slab_manager_create(struct pb_manager *provider,
- size_t bufSize,
- size_t slabSize,
+ pb_size bufSize,
+ pb_size slabSize,
const struct pb_desc *desc);
/**
@@ -146,9 +146,9 @@ pb_slab_manager_create(struct pb_manager *provider,
*/
struct pb_manager *
pb_slab_range_manager_create(struct pb_manager *provider,
- size_t minBufSize,
- size_t maxBufSize,
- size_t slabSize,
+ pb_size minBufSize,
+ pb_size maxBufSize,
+ pb_size slabSize,
const struct pb_desc *desc);
@@ -204,7 +204,7 @@ pb_ondemand_manager_create(struct pb_manager *provider);
*/
struct pb_manager *
pb_debug_manager_create(struct pb_manager *provider,
- size_t underflow_size, size_t overflow_size);
+ pb_size underflow_size, pb_size overflow_size);
#ifdef __cplusplus
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c
index db67d46c561..f60c836f18b 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c
@@ -60,7 +60,7 @@ pb_alt_manager(struct pb_manager *mgr)
static struct pb_buffer *
pb_alt_manager_create_buffer(struct pb_manager *_mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct pb_alt_manager *mgr = pb_alt_manager(_mgr);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
index 35358430b43..57d1ede45a4 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
@@ -81,7 +81,7 @@ struct pb_cache_manager
pipe_mutex mutex;
struct list_head delayed;
- size_t numDelayed;
+ pb_size numDelayed;
};
@@ -204,7 +204,7 @@ pb_cache_buffer_fence(struct pb_buffer *_buf,
static void
pb_cache_buffer_get_base_buffer(struct pb_buffer *_buf,
struct pb_buffer **base_buf,
- unsigned *offset)
+ pb_size *offset)
{
struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
pb_get_base_buffer(buf->buffer, base_buf, offset);
@@ -224,7 +224,7 @@ pb_cache_buffer_vtbl = {
static INLINE boolean
pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
if(buf->base.base.size < size)
@@ -246,7 +246,7 @@ pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
static struct pb_buffer *
pb_cache_manager_create_buffer(struct pb_manager *_mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct pb_cache_manager *mgr = pb_cache_manager(_mgr);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index cedf745bdac..1b4df28c707 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -72,8 +72,8 @@ struct pb_debug_buffer
struct pb_buffer *buffer;
struct pb_debug_manager *mgr;
- size_t underflow_size;
- size_t overflow_size;
+ pb_size underflow_size;
+ pb_size overflow_size;
struct debug_stack_frame create_backtrace[PB_DEBUG_CREATE_BACKTRACE];
@@ -91,8 +91,8 @@ struct pb_debug_manager
struct pb_manager *provider;
- size_t underflow_size;
- size_t overflow_size;
+ pb_size underflow_size;
+ pb_size overflow_size;
pipe_mutex mutex;
struct list_head list;
@@ -124,9 +124,9 @@ static const uint8_t random_pattern[32] = {
static INLINE void
-fill_random_pattern(uint8_t *dst, size_t size)
+fill_random_pattern(uint8_t *dst, pb_size size)
{
- size_t i = 0;
+ pb_size i = 0;
while(size--) {
*dst++ = random_pattern[i++];
i &= sizeof(random_pattern) - 1;
@@ -135,11 +135,11 @@ fill_random_pattern(uint8_t *dst, size_t size)
static INLINE boolean
-check_random_pattern(const uint8_t *dst, size_t size,
- size_t *min_ofs, size_t *max_ofs)
+check_random_pattern(const uint8_t *dst, pb_size size,
+ pb_size *min_ofs, pb_size *max_ofs)
{
boolean result = TRUE;
- size_t i;
+ pb_size i;
*min_ofs = size;
*max_ofs = 0;
for(i = 0; i < size; ++i) {
@@ -183,7 +183,7 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
assert(map);
if(map) {
boolean underflow, overflow;
- size_t min_ofs, max_ofs;
+ pb_size min_ofs, max_ofs;
underflow = !check_random_pattern(map, buf->underflow_size,
&min_ofs, &max_ofs);
@@ -287,7 +287,7 @@ pb_debug_buffer_unmap(struct pb_buffer *_buf)
static void
pb_debug_buffer_get_base_buffer(struct pb_buffer *_buf,
struct pb_buffer **base_buf,
- unsigned *offset)
+ pb_size *offset)
{
struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
pb_get_base_buffer(buf->buffer, base_buf, offset);
@@ -363,13 +363,13 @@ pb_debug_manager_dump(struct pb_debug_manager *mgr)
static struct pb_buffer *
pb_debug_manager_create_buffer(struct pb_manager *_mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct pb_debug_manager *mgr = pb_debug_manager(_mgr);
struct pb_debug_buffer *buf;
struct pb_desc real_desc;
- size_t real_size;
+ pb_size real_size;
buf = CALLOC_STRUCT(pb_debug_buffer);
if(!buf)
@@ -455,7 +455,7 @@ pb_debug_manager_destroy(struct pb_manager *_mgr)
struct pb_manager *
pb_debug_manager_create(struct pb_manager *provider,
- size_t underflow_size, size_t overflow_size)
+ pb_size underflow_size, pb_size overflow_size)
{
struct pb_debug_manager *mgr;
@@ -485,7 +485,7 @@ pb_debug_manager_create(struct pb_manager *provider,
struct pb_manager *
pb_debug_manager_create(struct pb_manager *provider,
- size_t underflow_size, size_t overflow_size)
+ pb_size underflow_size, pb_size overflow_size)
{
return provider;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c
index 144db5669b6..97dd1427fda 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_fenced.c
@@ -62,7 +62,7 @@ fenced_pb_manager(struct pb_manager *mgr)
static struct pb_buffer *
fenced_bufmgr_create_buffer(struct pb_manager *mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct fenced_pb_manager *fenced_mgr = fenced_pb_manager(mgr);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
index d8decba49df..6400fc5b0a3 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
@@ -55,10 +55,10 @@ struct mm_pb_manager
pipe_mutex mutex;
- size_t size;
+ pb_size size;
struct mem_block *heap;
- size_t align2;
+ pb_size align2;
struct pb_buffer *buffer;
void *map;
@@ -148,7 +148,7 @@ mm_buffer_fence(struct pb_buffer *buf,
static void
mm_buffer_get_base_buffer(struct pb_buffer *buf,
struct pb_buffer **base_buf,
- unsigned *offset)
+ pb_size *offset)
{
struct mm_buffer *mm_buf = mm_buffer(buf);
struct mm_pb_manager *mm = mm_buf->mgr;
@@ -170,15 +170,15 @@ mm_buffer_vtbl = {
static struct pb_buffer *
mm_bufmgr_create_buffer(struct pb_manager *mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct mm_pb_manager *mm = mm_pb_manager(mgr);
struct mm_buffer *mm_buf;
/* We don't handle alignments larger then the one initially setup */
- assert(pb_check_alignment(desc->alignment, 1 << mm->align2));
- if(!pb_check_alignment(desc->alignment, 1 << mm->align2))
+ assert(pb_check_alignment(desc->alignment, (pb_size)1 << mm->align2));
+ if(!pb_check_alignment(desc->alignment, (pb_size)1 << mm->align2))
return NULL;
pipe_mutex_lock(mm->mutex);
@@ -198,7 +198,7 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
mm_buf->mgr = mm;
- mm_buf->block = u_mmAllocMem(mm->heap, size, mm->align2, 0);
+ mm_buf->block = u_mmAllocMem(mm->heap, (int)size, (int)mm->align2, 0);
if(!mm_buf->block) {
#if 0
debug_printf("warning: heap full\n");
@@ -210,8 +210,8 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
}
/* Some sanity checks */
- assert(0 <= (unsigned)mm_buf->block->ofs && (unsigned)mm_buf->block->ofs < mm->size);
- assert(size <= (unsigned)mm_buf->block->size && (unsigned)mm_buf->block->ofs + (unsigned)mm_buf->block->size <= mm->size);
+ assert(0 <= (pb_size)mm_buf->block->ofs && (pb_size)mm_buf->block->ofs < mm->size);
+ assert(size <= (pb_size)mm_buf->block->size && (pb_size)mm_buf->block->ofs + (pb_size)mm_buf->block->size <= mm->size);
pipe_mutex_unlock(mm->mutex);
return SUPER(mm_buf);
@@ -245,7 +245,7 @@ mm_bufmgr_destroy(struct pb_manager *mgr)
struct pb_manager *
mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
- size_t size, size_t align2)
+ pb_size size, pb_size align2)
{
struct mm_pb_manager *mm;
@@ -273,7 +273,7 @@ mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
if(!mm->map)
goto failure;
- mm->heap = u_mmInit(0, size);
+ mm->heap = u_mmInit(0, (int)size);
if (!mm->heap)
goto failure;
@@ -292,7 +292,7 @@ if(mm->heap)
struct pb_manager *
mm_bufmgr_create(struct pb_manager *provider,
- size_t size, size_t align2)
+ pb_size size, pb_size align2)
{
struct pb_buffer *buffer;
struct pb_manager *mgr;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c
index 4f7e6b1c4df..bc3093f620f 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c
@@ -55,7 +55,7 @@ struct pb_ondemand_buffer
/** Real buffer */
struct pb_buffer *buffer;
- size_t size;
+ pb_size size;
struct pb_desc desc;
};
@@ -204,7 +204,7 @@ pb_ondemand_buffer_fence(struct pb_buffer *_buf,
static void
pb_ondemand_buffer_get_base_buffer(struct pb_buffer *_buf,
struct pb_buffer **base_buf,
- unsigned *offset)
+ pb_size *offset)
{
struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf);
@@ -232,7 +232,7 @@ pb_ondemand_buffer_vtbl = {
static struct pb_buffer *
pb_ondemand_manager_create_buffer(struct pb_manager *_mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct pb_ondemand_manager *mgr = pb_ondemand_manager(_mgr);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
index 07fd1a22d93..7fd65ed2261 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
@@ -58,11 +58,11 @@ struct pool_pb_manager
pipe_mutex mutex;
- size_t bufSize;
- size_t bufAlign;
+ pb_size bufSize;
+ pb_size bufAlign;
- size_t numFree;
- size_t numTot;
+ pb_size numFree;
+ pb_size numTot;
struct list_head free;
@@ -89,7 +89,7 @@ struct pool_buffer
struct list_head head;
- size_t start;
+ pb_size start;
};
@@ -162,7 +162,7 @@ pool_buffer_fence(struct pb_buffer *buf,
static void
pool_buffer_get_base_buffer(struct pb_buffer *buf,
struct pb_buffer **base_buf,
- unsigned *offset)
+ pb_size *offset)
{
struct pool_buffer *pool_buf = pool_buffer(buf);
struct pool_pb_manager *pool = pool_buf->mgr;
@@ -184,7 +184,7 @@ pool_buffer_vtbl = {
static struct pb_buffer *
pool_bufmgr_create_buffer(struct pb_manager *mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct pool_pb_manager *pool = pool_pb_manager(mgr);
@@ -251,13 +251,13 @@ pool_bufmgr_destroy(struct pb_manager *mgr)
struct pb_manager *
pool_bufmgr_create(struct pb_manager *provider,
- size_t numBufs,
- size_t bufSize,
+ pb_size numBufs,
+ pb_size bufSize,
const struct pb_desc *desc)
{
struct pool_pb_manager *pool;
struct pool_buffer *pool_buf;
- size_t i;
+ pb_size i;
if(!provider)
return NULL;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
index 724aaadb436..e7352e90db9 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
@@ -68,7 +68,7 @@ struct pb_slab_buffer
unsigned mapCount;
/** Offset relative to the start of the slab buffer. */
- size_t start;
+ pb_size start;
/** Use when validating, to signal that all mappings are finished */
/* TODO: Actually validation does not reach this stage yet */
@@ -83,8 +83,8 @@ struct pb_slab
{
struct list_head head;
struct list_head freeBuffers;
- size_t numBuffers;
- size_t numFree;
+ pb_size numBuffers;
+ pb_size numFree;
struct pb_slab_buffer *buffers;
struct pb_slab_manager *mgr;
@@ -108,10 +108,10 @@ struct pb_slab_manager
struct pb_manager *provider;
/** Size of the buffers we hand on downstream */
- size_t bufSize;
+ pb_size bufSize;
/** Size of the buffers we request upstream */
- size_t slabSize;
+ pb_size slabSize;
/**
* Alignment, usage to be used to allocate the slab buffers.
@@ -150,14 +150,14 @@ struct pb_slab_range_manager
struct pb_manager *provider;
- size_t minBufSize;
- size_t maxBufSize;
+ pb_size minBufSize;
+ pb_size maxBufSize;
/** @sa pb_slab_manager::desc */
struct pb_desc desc;
unsigned numBuckets;
- size_t *bucketSizes;
+ pb_size *bucketSizes;
/** Array of pb_slab_manager, one for each bucket size */
struct pb_manager **buckets;
@@ -270,7 +270,7 @@ pb_slab_buffer_fence(struct pb_buffer *_buf,
static void
pb_slab_buffer_get_base_buffer(struct pb_buffer *_buf,
struct pb_buffer **base_buf,
- unsigned *offset)
+ pb_size *offset)
{
struct pb_slab_buffer *buf = pb_slab_buffer(_buf);
pb_get_base_buffer(buf->slab->bo, base_buf, offset);
@@ -369,7 +369,7 @@ out_err0:
static struct pb_buffer *
pb_slab_manager_create_buffer(struct pb_manager *_mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct pb_slab_manager *mgr = pb_slab_manager(_mgr);
@@ -450,8 +450,8 @@ pb_slab_manager_destroy(struct pb_manager *_mgr)
struct pb_manager *
pb_slab_manager_create(struct pb_manager *provider,
- size_t bufSize,
- size_t slabSize,
+ pb_size bufSize,
+ pb_size slabSize,
const struct pb_desc *desc)
{
struct pb_slab_manager *mgr;
@@ -479,11 +479,11 @@ pb_slab_manager_create(struct pb_manager *provider,
static struct pb_buffer *
pb_slab_range_manager_create_buffer(struct pb_manager *_mgr,
- size_t size,
+ pb_size size,
const struct pb_desc *desc)
{
struct pb_slab_range_manager *mgr = pb_slab_range_manager(_mgr);
- size_t bufSize;
+ pb_size bufSize;
unsigned i;
bufSize = mgr->minBufSize;
@@ -527,13 +527,13 @@ pb_slab_range_manager_destroy(struct pb_manager *_mgr)
struct pb_manager *
pb_slab_range_manager_create(struct pb_manager *provider,
- size_t minBufSize,
- size_t maxBufSize,
- size_t slabSize,
+ pb_size minBufSize,
+ pb_size maxBufSize,
+ pb_size slabSize,
const struct pb_desc *desc)
{
struct pb_slab_range_manager *mgr;
- size_t bufSize;
+ pb_size bufSize;
unsigned i;
if(!provider)