diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-12-31 07:12:27 +0000 |
commit | 051645c92924bf915d82bf219f2ed67309b5577a (patch) | |
tree | 4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/drivers/llvmpipe/lp_fence.c | |
parent | 2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff) |
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/drivers/llvmpipe/lp_fence.c')
-rw-r--r-- | lib/mesa/src/gallium/drivers/llvmpipe/lp_fence.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_fence.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_fence.c index a21a3c744..20cd91cd6 100644 --- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_fence.c +++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_fence.c @@ -52,8 +52,8 @@ lp_fence_create(unsigned rank) pipe_reference_init(&fence->reference, 1); - pipe_mutex_init(fence->mutex); - pipe_condvar_init(fence->signalled); + (void) mtx_init(&fence->mutex, mtx_plain); + cnd_init(&fence->signalled); fence->id = fence_id++; fence->rank = rank; @@ -72,8 +72,8 @@ lp_fence_destroy(struct lp_fence *fence) if (LP_DEBUG & DEBUG_FENCE) debug_printf("%s %d\n", __FUNCTION__, fence->id); - pipe_mutex_destroy(fence->mutex); - pipe_condvar_destroy(fence->signalled); + mtx_destroy(&fence->mutex); + cnd_destroy(&fence->signalled); FREE(fence); } @@ -88,7 +88,7 @@ lp_fence_signal(struct lp_fence *fence) if (LP_DEBUG & DEBUG_FENCE) debug_printf("%s %d\n", __FUNCTION__, fence->id); - pipe_mutex_lock(fence->mutex); + mtx_lock(&fence->mutex); fence->count++; assert(fence->count <= fence->rank); @@ -99,9 +99,9 @@ lp_fence_signal(struct lp_fence *fence) /* Wakeup all threads waiting on the mutex: */ - pipe_condvar_broadcast(fence->signalled); + cnd_broadcast(&fence->signalled); - pipe_mutex_unlock(fence->mutex); + mtx_unlock(&fence->mutex); } boolean @@ -116,12 +116,12 @@ lp_fence_wait(struct lp_fence *f) if (LP_DEBUG & DEBUG_FENCE) debug_printf("%s %d\n", __FUNCTION__, f->id); - pipe_mutex_lock(f->mutex); + mtx_lock(&f->mutex); assert(f->issued); while (f->count < f->rank) { - pipe_condvar_wait(f->signalled, f->mutex); + cnd_wait(&f->signalled, &f->mutex); } - pipe_mutex_unlock(f->mutex); + mtx_unlock(&f->mutex); } |