summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-03-13 15:47:18 +0100
committerThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-03-16 11:40:47 +0100
commitcf25ef9072f5290d228a381727c4ff921b0c60d6 (patch)
tree6e8be9bcf952d395920d742ac3468896c52ffed8 /src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
parentfc1ef97c3349588cd33a22dc88ab30b6f701000e (diff)
gallium: Use struct pipe_atomic for pipe refcounts.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
index ca6c14a627..75b95e132e 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
@@ -108,7 +108,7 @@ pool_buffer_destroy(struct pb_buffer *buf)
struct pool_buffer *pool_buf = pool_buffer(buf);
struct pool_pb_manager *pool = pool_buf->mgr;
- assert(pool_buf->base.base.reference.count == 0);
+ assert(p_atomic_read(&pool_buf->base.base.reference.count) == 0);
pipe_mutex_lock(pool->mutex);
LIST_ADD(&pool_buf->head, &pool->free);
@@ -216,7 +216,7 @@ pool_bufmgr_create_buffer(struct pb_manager *mgr,
pipe_mutex_unlock(pool->mutex);
pool_buf = LIST_ENTRY(struct pool_buffer, item, head);
- assert(pool_buf->base.base.reference.count == 0);
+ assert(p_atomic_read(&pool_buf->base.base.reference.count) == 0);
pipe_reference_init(&pool_buf->base.base.reference, 1);
pool_buf->base.base.alignment = desc->alignment;
pool_buf->base.base.usage = desc->usage;