return 0;
}
-#define pipe_mutex_init(mutex) \
- (void) mtx_init(&(mutex), mtx_plain)
-
#define pipe_mutex_destroy(mutex) \
mtx_destroy(&(mutex))
barrier->count = count;
barrier->waiters = 0;
barrier->sequence = 0;
- pipe_mutex_init(barrier->mutex);
+ (void) mtx_init(&barrier->mutex, mtx_plain);
cnd_init(&barrier->condvar);
}
static inline void
pipe_semaphore_init(pipe_semaphore *sema, int init_val)
{
- pipe_mutex_init(sema->mutex);
+ (void) mtx_init(&sema->mutex, mtx_plain);
cnd_init(&sema->cond);
sema->counter = init_val;
}
LIST_INITHEAD(&fenced_mgr->unfenced);
fenced_mgr->num_unfenced = 0;
- pipe_mutex_init(fenced_mgr->mutex);
+ (void) mtx_init(&fenced_mgr->mutex, mtx_plain);
return &fenced_mgr->base;
}
pb_debug_buffer_fill(buf);
- pipe_mutex_init(buf->mutex);
+ (void) mtx_init(&buf->mutex, mtx_plain);
pipe_mutex_lock(mgr->mutex);
LIST_ADDTAIL(&buf->head, &mgr->list);
mgr->underflow_size = underflow_size;
mgr->overflow_size = overflow_size;
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
LIST_INITHEAD(&mgr->list);
return &mgr->base;
mm->size = size;
mm->align2 = align2; /* 64-byte alignment */
- pipe_mutex_init(mm->mutex);
+ (void) mtx_init(&mm->mutex, mtx_plain);
mm->buffer = buffer;
pool->bufSize = bufSize;
pool->bufAlign = desc->alignment;
- pipe_mutex_init(pool->mutex);
+ (void) mtx_init(&pool->mutex, mtx_plain);
pool->buffer = provider->create_buffer(provider, numBufs*bufSize, desc);
if (!pool->buffer)
LIST_INITHEAD(&mgr->slabs);
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
return &mgr->base;
}
for (i = 0; i < ARRAY_SIZE(mgr->buckets); i++)
LIST_INITHEAD(&mgr->buckets[i]);
- pipe_mutex_init(mgr->mutex);
+ (void) mtx_init(&mgr->mutex, mtx_plain);
mgr->cache_size = 0;
mgr->max_cache_size = maximum_cache_size;
mgr->usecs = usecs;
LIST_INITHEAD(&group->slabs);
}
- pipe_mutex_init(slabs->mutex);
+ (void) mtx_init(&slabs->mutex, mtx_plain);
return true;
}
fbuf->supports_unsync = supports_unsync;
fbuf->bt_depth = bt_depth;
pipe_reference_init(&fbuf->reference, 1);
- pipe_mutex_init(fbuf->mutex);
+ (void) mtx_init(&fbuf->mutex, mtx_plain);
return fbuf;
out_no_buf:
static boolean first = TRUE;
if (first) {
- pipe_mutex_init(serials_mutex);
+ (void) mtx_init(&serials_mutex, mtx_plain);
first = FALSE;
}
#endif
static boolean first = TRUE;
if (first) {
- pipe_mutex_init(symbols_mutex);
+ (void) mtx_init(&symbols_mutex, mtx_plain);
first = FALSE;
}
#endif
util_queue_fence_init(struct util_queue_fence *fence)
{
memset(fence, 0, sizeof(*fence));
- pipe_mutex_init(fence->mutex);
+ (void) mtx_init(&fence->mutex, mtx_plain);
cnd_init(&fence->cond);
fence->signalled = true;
}
if (!queue->jobs)
goto fail;
- pipe_mutex_init(queue->lock);
+ (void) mtx_init(&queue->lock, mtx_plain);
queue->num_queued = 0;
cnd_init(&queue->has_queued_cond);
static inline void
util_range_init(struct util_range *range)
{
- pipe_mutex_init(range->write_mutex);
+ (void) mtx_init(&range->write_mutex, mtx_plain);
util_range_set_empty(range);
}
ring->mask = dwords - 1;
cnd_init(&ring->change);
- pipe_mutex_init(ring->mutex);
+ (void) mtx_init(&ring->mutex, mtx_plain);
return ring;
fail:
*dctx->mapped_fence = 0;
- pipe_mutex_init(dctx->mutex);
+ (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);
fd_bc_init(&screen->batch_cache);
- pipe_mutex_init(screen->lock);
+ (void) mtx_init(&screen->lock, mtx_plain);
pscreen->destroy = fd_screen_destroy;
pscreen->get_param = fd_screen_get_param;
pipe_reference_init(&fence->reference, 1);
- pipe_mutex_init(fence->mutex);
+ (void) mtx_init(&fence->mutex, mtx_plain);
cnd_init(&fence->signalled);
fence->id = fence_id++;
scene->data.head =
CALLOC_STRUCT(data_block);
- pipe_mutex_init(scene->mutex);
+ (void) mtx_init(&scene->mutex, mtx_plain);
#ifdef DEBUG
/* Do some scene limit sanity checks here */
FREE(screen);
return NULL;
}
- pipe_mutex_init(screen->rast_mutex);
+ (void) mtx_init(&screen->rast_mutex, mtx_plain);
util_format_s3tc_init();
return false;
}
- pipe_mutex_init(screen->blitter->mutex);
+ (void) mtx_init(&screen->blitter->mutex, mtx_plain);
nv50_blitter_make_vp(screen->blitter);
nv50_blitter_make_sampler(screen->blitter);
}
screen->blitter->screen = screen;
- pipe_mutex_init(screen->blitter->mutex);
+ (void) mtx_init(&screen->blitter->mutex, mtx_plain);
nvc0_blitter_make_vp(screen->blitter);
nvc0_blitter_make_sampler(screen->blitter);
slab_create_parent(&r300screen->pool_transfers, sizeof(struct pipe_transfer), 64);
util_format_s3tc_init();
- pipe_mutex_init(r300screen->cmask_mutex);
+ (void) mtx_init(&r300screen->cmask_mutex, mtx_plain);
return &r300screen->screen;
}
}
util_format_s3tc_init();
- pipe_mutex_init(rscreen->aux_context_lock);
- pipe_mutex_init(rscreen->gpu_load_mutex);
+ (void) mtx_init(&rscreen->aux_context_lock, mtx_plain);
+ (void) mtx_init(&rscreen->gpu_load_mutex, mtx_plain);
if (rscreen->debug_flags & DBG_INFO) {
printf("pci_id = 0x%x\n", rscreen->info.pci_id);
sscreen->b.has_cp_dma = true;
sscreen->b.has_streamout = true;
- pipe_mutex_init(sscreen->shader_parts_mutex);
+ (void) mtx_init(&sscreen->shader_parts_mutex, mtx_plain);
sscreen->use_monolithic_shaders =
(sscreen->b.debug_flags & DBG_MONOLITHIC_SHADERS) != 0;
bool si_init_shader_cache(struct si_screen *sscreen)
{
- pipe_mutex_init(sscreen->shader_cache_mutex);
+ (void) mtx_init(&sscreen->shader_cache_mutex, mtx_plain);
sscreen->shader_cache =
_mesa_hash_table_create(NULL,
si_shader_cache_key_hash,
sel->db_shader_control |= S_02880C_Z_ORDER(V_02880C_EARLY_Z_THEN_LATE_Z);
}
- pipe_mutex_init(sel->mutex);
+ (void) mtx_init(&sel->mutex, mtx_plain);
util_queue_fence_init(&sel->ready);
if ((sctx->b.debug.debug_message && !sctx->b.debug.async) ||
if (!rb_pipe)
return NULL;
- pipe_mutex_init(rb_pipe->draw_mutex);
+ (void) mtx_init(&rb_pipe->draw_mutex, mtx_plain);
cnd_init(&rb_pipe->draw_cond);
- pipe_mutex_init(rb_pipe->call_mutex);
- pipe_mutex_init(rb_pipe->list_mutex);
+ (void) mtx_init(&rb_pipe->call_mutex, mtx_plain);
+ (void) mtx_init(&rb_pipe->list_mutex, mtx_plain);
make_empty_list(&rb_pipe->shaders);
rb_pipe->base.screen = _screen;
if (!rb_screen)
return screen;
- pipe_mutex_init(rb_screen->list_mutex);
+ (void) mtx_init(&rb_screen->list_mutex, mtx_plain);
make_empty_list(&rb_screen->contexts);
make_empty_list(&rb_screen->resources);
make_empty_list(&rb_screen->surfaces);
debug_printf("svga: msaa samples mask: 0x%x\n", svgascreen->ms_samples);
}
- pipe_mutex_init(svgascreen->tex_mutex);
- pipe_mutex_init(svgascreen->swc_mutex);
+ (void) mtx_init(&svgascreen->tex_mutex, mtx_plain);
+ (void) mtx_init(&svgascreen->swc_mutex, mtx_plain);
svga_screen_cache_init(svgascreen);
assert(cache->total_size == 0);
- pipe_mutex_init(cache->mutex);
+ (void) mtx_init(&cache->mutex, mtx_plain);
for (i = 0; i < SVGA_HOST_SURFACE_CACHE_BUCKETS; ++i)
LIST_INITHEAD(&cache->bucket[i]);
screen->fd = fd;
list_inithead(&screen->bo_cache.time_list);
- pipe_mutex_init(screen->bo_handles_mutex);
+ (void) mtx_init(&screen->bo_handles_mutex, mtx_plain);
screen->bo_handles = util_hash_table_create(handle_hash, handle_compare);
screen->has_control_flow =
screen->sPriv = sPriv;
screen->fd = sPriv->fd;
- pipe_mutex_init(screen->opencl_func_mutex);
+ (void) mtx_init(&screen->opencl_func_mutex, mtx_plain);
sPriv->driverPrivate = (void *)screen;
}
if (xmdpy->screen && xmdpy->smapi) {
- pipe_mutex_init(xmdpy->mutex);
+ (void) mtx_init(&xmdpy->mutex, mtx_plain);
}
else {
if (xmdpy->screen) {
}
cnd_init(&ctx->event_pop);
- pipe_mutex_init(ctx->mutex_pop);
+ (void) mtx_init(&ctx->mutex_pop, mtx_plain);
cnd_init(&ctx->event_push);
- pipe_mutex_init(ctx->mutex_push);
+ (void) mtx_init(&ctx->mutex_push, mtx_plain);
/* Block until first cmdbuf has been flushed. */
ctx->worker_wait = TRUE;
return NULL;
}
cnd_init(&ctx->event_processed);
- pipe_mutex_init(ctx->mutex_processed);
- pipe_mutex_init(ctx->thread_running);
- pipe_mutex_init(ctx->thread_resume);
+ (void) mtx_init(&ctx->mutex_processed, mtx_plain);
+ (void) mtx_init(&ctx->thread_running, mtx_plain);
+ (void) mtx_init(&ctx->thread_resume, mtx_plain);
#if DEBUG
pipe_thread_setname("Main thread");
vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_BT_601, NULL, true, &drv->csc);
if (!vl_compositor_set_csc_matrix(&drv->cstate, (const vl_csc_matrix *)&drv->csc, 1.0f, 0.0f))
goto error_csc_matrix;
- pipe_mutex_init(drv->mutex);
+ (void) mtx_init(&drv->mutex, mtx_plain);
ctx->pDriverData = (void *)drv;
ctx->version_major = 0;
goto error_handle;
}
- pipe_mutex_init(vldecoder->mutex);
+ (void) mtx_init(&vldecoder->mutex, mtx_plain);
pipe_mutex_unlock(dev->mutex);
return VDP_STATUS_OK;
goto no_compositor;
}
- pipe_mutex_init(dev->mutex);
+ (void) mtx_init(&dev->mutex, mtx_plain);
*get_proc_address = &vlVdpGetProcAddress;
CreateScreen();
- pipe_mutex_init(fMutex);
+ (void) mtx_init(&fMutex, mtx_plain);
}
amdgpu_surface_init_functions(ws);
LIST_INITHEAD(&ws->global_bo_list);
- pipe_mutex_init(ws->global_bo_list_lock);
- pipe_mutex_init(ws->bo_fence_lock);
+ (void) mtx_init(&ws->global_bo_list_lock, mtx_plain);
+ (void) mtx_init(&ws->bo_fence_lock, mtx_plain);
if (!util_queue_init(&ws->cs_queue, "amdgpu_cs", 8, 1)) {
amdgpu_winsys_destroy(&ws->base);
bo->va = 0;
bo->initial_domain = initial_domains;
bo->hash = __sync_fetch_and_add(&rws->next_bo_hash, 1);
- pipe_mutex_init(bo->u.real.map_mutex);
+ (void) mtx_init(&bo->u.real.map_mutex, mtx_plain);
pb_cache_init_entry(&rws->bo_cache, &bo->u.real.cache_entry, &bo->base,
pb_cache_bucket);
bo->va = 0;
bo->initial_domain = RADEON_DOMAIN_GTT;
bo->hash = __sync_fetch_and_add(&ws->next_bo_hash, 1);
- pipe_mutex_init(bo->u.real.map_mutex);
+ (void) mtx_init(&bo->u.real.map_mutex, mtx_plain);
util_hash_table_set(ws->bo_handles, (void*)(uintptr_t)bo->handle, bo);
bo->rws = ws;
bo->va = 0;
bo->hash = __sync_fetch_and_add(&ws->next_bo_hash, 1);
- pipe_mutex_init(bo->u.real.map_mutex);
+ (void) mtx_init(&bo->u.real.map_mutex, mtx_plain);
if (bo->flink_name)
util_hash_table_set(ws->bo_names, (void*)(uintptr_t)bo->flink_name, bo);
radeon_drm_cs_init_functions(ws);
radeon_surface_init_functions(ws);
- pipe_mutex_init(ws->hyperz_owner_mutex);
- pipe_mutex_init(ws->cmask_owner_mutex);
+ (void) mtx_init(&ws->hyperz_owner_mutex, mtx_plain);
+ (void) mtx_init(&ws->cmask_owner_mutex, mtx_plain);
ws->bo_names = util_hash_table_create(handle_hash, handle_compare);
ws->bo_handles = util_hash_table_create(handle_hash, handle_compare);
ws->bo_vas = util_hash_table_create(handle_hash, handle_compare);
- pipe_mutex_init(ws->bo_handles_mutex);
- pipe_mutex_init(ws->bo_va_mutex);
- pipe_mutex_init(ws->bo_fence_lock);
+ (void) mtx_init(&ws->bo_handles_mutex, mtx_plain);
+ (void) mtx_init(&ws->bo_va_mutex, mtx_plain);
+ (void) mtx_init(&ws->bo_fence_lock, mtx_plain);
ws->va_offset = ws->va_start;
list_inithead(&ws->va_holes);
LIST_INITHEAD(&fenced_mgr->unfenced);
fenced_mgr->num_unfenced = 0;
- pipe_mutex_init(fenced_mgr->mutex);
+ (void) mtx_init(&fenced_mgr->mutex, mtx_plain);
return &fenced_mgr->base;
}
if(!ops)
return NULL;
- pipe_mutex_init(ops->mutex);
+ (void) mtx_init(&ops->mutex, mtx_plain);
LIST_INITHEAD(&ops->not_signaled);
ops->base.destroy = &vmw_fence_ops_destroy;
ops->base.fence_reference = &vmw_fence_ops_fence_reference;
pipe_reference_init(&surface->refcnt, 1);
p_atomic_set(&surface->validated, 0);
surface->screen = vws;
- pipe_mutex_init(surface->mutex);
+ (void) mtx_init(&surface->mutex, mtx_plain);
surface->shared = !!(usage & SVGA_SURFACE_USAGE_SHARED);
provider = (surface->shared) ? vws->pools.gmr : vws->pools.mob_fenced;
qdws->num_delayed = 0;
qdws->usecs = 1000000;
LIST_INITHEAD(&qdws->delayed);
- pipe_mutex_init(qdws->mutex);
- pipe_mutex_init(qdws->bo_handles_mutex);
+ (void) mtx_init(&qdws->mutex, mtx_plain);
+ (void) mtx_init(&qdws->bo_handles_mutex, mtx_plain);
qdws->bo_handles = util_hash_table_create(handle_hash, handle_compare);
qdws->bo_names = util_hash_table_create(handle_hash, handle_compare);
qdws->base.destroy = virgl_drm_winsys_destroy;
vtws->usecs = 1000000;
LIST_INITHEAD(&vtws->delayed);
- pipe_mutex_init(vtws->mutex);
+ (void) mtx_init(&vtws->mutex, mtx_plain);
vtws->base.destroy = virgl_vtest_winsys_destroy;