return 0;
}
-#define pipe_mutex_destroy(mutex) \
- mtx_destroy(&(mutex))
-
#define pipe_mutex_lock(mutex) \
(void) mtx_lock(&(mutex))
static inline void pipe_barrier_destroy(pipe_barrier *barrier)
{
assert(barrier->waiters == 0);
- pipe_mutex_destroy(barrier->mutex);
+ mtx_destroy(&barrier->mutex);
cnd_destroy(&barrier->condvar);
}
static inline void
pipe_semaphore_destroy(pipe_semaphore *sema)
{
- pipe_mutex_destroy(sema->mutex);
+ mtx_destroy(&sema->mutex);
cnd_destroy(&sema->cond);
}
#endif
pipe_mutex_unlock(fenced_mgr->mutex);
- pipe_mutex_destroy(fenced_mgr->mutex);
+ mtx_destroy(&fenced_mgr->mutex);
if (fenced_mgr->provider)
fenced_mgr->provider->destroy(fenced_mgr->provider);
LIST_DEL(&buf->head);
pipe_mutex_unlock(mgr->mutex);
- pipe_mutex_destroy(buf->mutex);
+ mtx_destroy(&buf->mutex);
pb_reference(&buf->buffer, NULL);
FREE(buf);
}
pipe_mutex_unlock(mgr->mutex);
- pipe_mutex_destroy(mgr->mutex);
+ mtx_destroy(&mgr->mutex);
mgr->provider->destroy(mgr->provider);
FREE(mgr);
}
pb_cache_deinit(struct pb_cache *mgr)
{
pb_cache_release_all_buffers(mgr);
- pipe_mutex_destroy(mgr->mutex);
+ mtx_destroy(&mgr->mutex);
}
}
FREE(slabs->groups);
- pipe_mutex_destroy(slabs->mutex);
+ mtx_destroy(&slabs->mutex);
}
{
assert(fence->signalled);
cnd_destroy(&fence->cond);
- pipe_mutex_destroy(fence->mutex);
+ mtx_destroy(&fence->mutex);
}
/****************************************************************************
if (queue->jobs) {
cnd_destroy(&queue->has_space_cond);
cnd_destroy(&queue->has_queued_cond);
- pipe_mutex_destroy(queue->lock);
+ mtx_destroy(&queue->lock);
FREE(queue->jobs);
}
/* also util_queue_is_initialized can be used to check for success */
cnd_destroy(&queue->has_space_cond);
cnd_destroy(&queue->has_queued_cond);
- pipe_mutex_destroy(queue->lock);
+ mtx_destroy(&queue->lock);
FREE(queue->jobs);
FREE(queue->threads);
}
static inline void
util_range_destroy(struct util_range *range)
{
- pipe_mutex_destroy(range->write_mutex);
+ mtx_destroy(&range->write_mutex);
}
#endif
void util_ringbuffer_destroy( struct util_ringbuffer *ring )
{
cnd_destroy(&ring->change);
- pipe_mutex_destroy(ring->mutex);
+ mtx_destroy(&ring->mutex);
FREE(ring->buf);
FREE(ring);
}
dctx->kill_thread = 1;
pipe_mutex_unlock(dctx->mutex);
pipe_thread_wait(dctx->thread);
- pipe_mutex_destroy(dctx->mutex);
+ mtx_destroy(&dctx->mutex);
assert(!dctx->records);
}
(void) mtx_init(&dctx->mutex, mtx_plain);
dctx->thread = pipe_thread_create(dd_thread_pipelined_hang_detect, dctx);
if (!dctx->thread) {
- pipe_mutex_destroy(dctx->mutex);
+ mtx_destroy(&dctx->mutex);
goto fail;
}
}
slab_destroy_parent(&screen->transfer_pool);
- pipe_mutex_destroy(screen->lock);
+ mtx_destroy(&screen->lock);
free(screen);
}
if (LP_DEBUG & DEBUG_FENCE)
debug_printf("%s %d\n", __FUNCTION__, fence->id);
- pipe_mutex_destroy(fence->mutex);
+ mtx_destroy(&fence->mutex);
cnd_destroy(&fence->signalled);
FREE(fence);
}
lp_scene_destroy(struct lp_scene *scene)
{
lp_fence_reference(&scene->fence, NULL);
- pipe_mutex_destroy(scene->mutex);
+ mtx_destroy(&scene->mutex);
assert(scene->data.head->next == NULL);
FREE(scene->data.head);
FREE(scene);
if(winsys->destroy)
winsys->destroy(winsys);
- pipe_mutex_destroy(screen->rast_mutex);
+ mtx_destroy(&screen->rast_mutex);
FREE(screen);
}
}
}
- pipe_mutex_destroy(blitter->mutex);
+ mtx_destroy(&blitter->mutex);
FREE(blitter);
}
}
}
- pipe_mutex_destroy(blitter->mutex);
+ mtx_destroy(&blitter->mutex);
FREE(blitter);
}
if (rws && !rws->unref(rws))
return;
- pipe_mutex_destroy(r300screen->cmask_mutex);
+ mtx_destroy(&r300screen->cmask_mutex);
slab_destroy_parent(&r300screen->pool_transfers);
if (rws)
r600_perfcounters_destroy(rscreen);
r600_gpu_load_kill_thread(rscreen);
- pipe_mutex_destroy(rscreen->gpu_load_mutex);
- pipe_mutex_destroy(rscreen->aux_context_lock);
+ mtx_destroy(&rscreen->gpu_load_mutex);
+ mtx_destroy(&rscreen->aux_context_lock);
rscreen->aux_context->destroy(rscreen->aux_context);
slab_destroy_parent(&rscreen->pool_transfers);
FREE(part);
}
}
- pipe_mutex_destroy(sscreen->shader_parts_mutex);
+ mtx_destroy(&sscreen->shader_parts_mutex);
si_destroy_shader_cache(sscreen);
r600_destroy_common_screen(&sscreen->b);
}
if (sscreen->shader_cache)
_mesa_hash_table_destroy(sscreen->shader_cache,
si_destroy_shader_cache_entry);
- pipe_mutex_destroy(sscreen->shader_cache_mutex);
+ mtx_destroy(&sscreen->shader_cache_mutex);
}
/* SHADER STATES */
si_delete_shader(sctx, sel->gs_copy_shader);
util_queue_fence_destroy(&sel->ready);
- pipe_mutex_destroy(sel->mutex);
+ mtx_destroy(&sel->mutex);
free(sel->tokens);
free(sel);
}
svga_screen_cache_cleanup(svgascreen);
- pipe_mutex_destroy(svgascreen->swc_mutex);
- pipe_mutex_destroy(svgascreen->tex_mutex);
+ mtx_destroy(&svgascreen->swc_mutex);
+ mtx_destroy(&svgascreen->tex_mutex);
svgascreen->sws->destroy(svgascreen->sws);
sws->fence_reference(sws, &cache->entries[i].fence, NULL);
}
- pipe_mutex_destroy(cache->mutex);
+ mtx_destroy(&cache->mutex);
}
screen->base.screen->destroy(screen->base.screen);
dri_destroy_option_cache(screen);
- pipe_mutex_destroy(screen->opencl_func_mutex);
+ mtx_destroy(&screen->opencl_func_mutex);
}
void
nine_queue_delete(struct nine_queue_pool *ctx)
{
unsigned i;
- pipe_mutex_destroy(ctx->mutex_pop);
- pipe_mutex_destroy(ctx->mutex_push);
+ mtx_destroy(&ctx->mutex_pop);
+ mtx_destroy(&ctx->mutex_push);
for (i = 0; i < NINE_CMD_BUFS; i++)
FREE(ctx->pool[i].mem_pool);
nine_csmt_wait_processed(ctx);
nine_queue_delete(ctx->pool);
- pipe_mutex_destroy(ctx->mutex_processed);
+ mtx_destroy(&ctx->mutex_processed);
FREE(ctx);
drv->pipe->destroy(drv->pipe);
drv->vscreen->destroy(drv->vscreen);
handle_table_destroy(drv->htab);
- pipe_mutex_destroy(drv->mutex);
+ mtx_destroy(&drv->mutex);
FREE(drv);
return VA_STATUS_SUCCESS;
pipe_mutex_lock(vldecoder->mutex);
vldecoder->decoder->destroy(vldecoder->decoder);
pipe_mutex_unlock(vldecoder->mutex);
- pipe_mutex_destroy(vldecoder->mutex);
+ mtx_destroy(&vldecoder->mutex);
vlRemoveDataHTAB(decoder);
DeviceReference(&vldecoder->device, NULL);
void
vlVdpDeviceFree(vlVdpDevice *dev)
{
- pipe_mutex_destroy(dev->mutex);
+ mtx_destroy(&dev->mutex);
vl_compositor_cleanup(&dev->compositor);
pipe_sampler_view_reference(&dev->dummy_sv, NULL);
dev->context->destroy(dev->context);
DestroyContext(i);
Unlock();
- pipe_mutex_destroy(fMutex);
+ mtx_destroy(&fMutex);
// TODO: Destroy fScreen
}
if (util_queue_is_initialized(&ws->cs_queue))
util_queue_destroy(&ws->cs_queue);
- pipe_mutex_destroy(ws->bo_fence_lock);
+ mtx_destroy(&ws->bo_fence_lock);
pb_slabs_deinit(&ws->bo_slabs);
pb_cache_deinit(&ws->bo_cache);
- pipe_mutex_destroy(ws->global_bo_list_lock);
+ mtx_destroy(&ws->global_bo_list_lock);
do_winsys_deinit(ws);
FREE(rws);
}
args.handle = bo->handle;
drmIoctl(rws->fd, DRM_IOCTL_GEM_CLOSE, &args);
- pipe_mutex_destroy(bo->u.real.map_mutex);
+ mtx_destroy(&bo->u.real.map_mutex);
if (bo->initial_domain & RADEON_DOMAIN_VRAM)
rws->allocated_vram -= align(bo->base.size, rws->info.gart_page_size);
if (util_queue_is_initialized(&ws->cs_queue))
util_queue_destroy(&ws->cs_queue);
- pipe_mutex_destroy(ws->hyperz_owner_mutex);
- pipe_mutex_destroy(ws->cmask_owner_mutex);
+ mtx_destroy(&ws->hyperz_owner_mutex);
+ mtx_destroy(&ws->cmask_owner_mutex);
if (ws->info.has_virtual_memory)
pb_slabs_deinit(&ws->bo_slabs);
util_hash_table_destroy(ws->bo_names);
util_hash_table_destroy(ws->bo_handles);
util_hash_table_destroy(ws->bo_vas);
- pipe_mutex_destroy(ws->bo_handles_mutex);
- pipe_mutex_destroy(ws->bo_va_mutex);
- pipe_mutex_destroy(ws->bo_fence_lock);
+ mtx_destroy(&ws->bo_handles_mutex);
+ mtx_destroy(&ws->bo_va_mutex);
+ mtx_destroy(&ws->bo_fence_lock);
if (ws->fd >= 0)
close(ws->fd);
#endif
pipe_mutex_unlock(fenced_mgr->mutex);
- pipe_mutex_destroy(fenced_mgr->mutex);
+ mtx_destroy(&fenced_mgr->mutex);
FREE(fenced_mgr);
}
assert(p_atomic_read(&dst->validated) == 0);
dst->sid = SVGA3D_INVALID_ID;
#endif
- pipe_mutex_destroy(dst->mutex);
+ mtx_destroy(&dst->mutex);
FREE(dst);
}
util_hash_table_destroy(qdws->bo_handles);
util_hash_table_destroy(qdws->bo_names);
- pipe_mutex_destroy(qdws->bo_handles_mutex);
- pipe_mutex_destroy(qdws->mutex);
+ mtx_destroy(&qdws->bo_handles_mutex);
+ mtx_destroy(&qdws->mutex);
FREE(qdws);
}
virgl_cache_flush(vtws);
- pipe_mutex_destroy(vtws->mutex);
+ mtx_destroy(&vtws->mutex);
FREE(vtws);
}