本文整理汇总了C++中pipe_mutex_destroy函数的典型用法代码示例。如果您正苦于以下问题:C++ pipe_mutex_destroy函数的具体用法?C++ pipe_mutex_destroy怎么用?C++ pipe_mutex_destroy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pipe_mutex_destroy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: radeon_winsys_destroy
static void radeon_winsys_destroy(struct radeon_winsys *rws)
{
struct radeon_drm_winsys *ws = (struct radeon_drm_winsys*)rws;
if (ws->thread) {
ws->kill_thread = 1;
pipe_semaphore_signal(&ws->cs_queued);
pipe_thread_wait(ws->thread);
}
pipe_semaphore_destroy(&ws->cs_queued);
pipe_condvar_destroy(ws->cs_queue_empty);
if (!pipe_reference(&ws->base.reference, NULL)) {
return;
}
pipe_mutex_destroy(ws->hyperz_owner_mutex);
pipe_mutex_destroy(ws->cmask_owner_mutex);
pipe_mutex_destroy(ws->cs_stack_lock);
ws->cman->destroy(ws->cman);
ws->kman->destroy(ws->kman);
if (ws->gen >= DRV_R600) {
radeon_surface_manager_free(ws->surf_man);
}
if (fd_tab) {
util_hash_table_remove(fd_tab, intptr_to_pointer(ws->fd));
}
FREE(rws);
}
示例2: radeon_winsys_destroy
static void radeon_winsys_destroy(struct radeon_winsys *rws)
{
struct radeon_drm_winsys *ws = (struct radeon_drm_winsys*)rws;
if (ws->thread) {
ws->kill_thread = 1;
pipe_semaphore_signal(&ws->cs_queued);
pipe_thread_wait(ws->thread);
}
pipe_semaphore_destroy(&ws->cs_queued);
pipe_mutex_destroy(ws->hyperz_owner_mutex);
pipe_mutex_destroy(ws->cmask_owner_mutex);
pipe_mutex_destroy(ws->cs_stack_lock);
ws->cman->destroy(ws->cman);
ws->kman->destroy(ws->kman);
if (ws->gen >= DRV_R600) {
radeon_surface_manager_free(ws->surf_man);
}
if (ws->fd >= 0)
close(ws->fd);
FREE(rws);
}
示例3: r600_destroy_common_screen
void r600_destroy_common_screen(struct r600_common_screen *rscreen)
{
r600_perfcounters_destroy(rscreen);
r600_gpu_load_kill_thread(rscreen);
pipe_mutex_destroy(rscreen->gpu_load_mutex);
pipe_mutex_destroy(rscreen->aux_context_lock);
rscreen->aux_context->destroy(rscreen->aux_context);
rscreen->ws->destroy(rscreen->ws);
FREE(rscreen);
}
示例4: virgl_drm_winsys_destroy
static void
virgl_drm_winsys_destroy(struct virgl_winsys *qws)
{
struct virgl_drm_winsys *qdws = virgl_drm_winsys(qws);
virgl_cache_flush(qdws);
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);
FREE(qdws);
}
示例5: svga_destroy_screen
static void
svga_destroy_screen( struct pipe_screen *screen )
{
struct svga_screen *svgascreen = svga_screen(screen);
svga_screen_cache_cleanup(svgascreen);
pipe_mutex_destroy(svgascreen->swc_mutex);
pipe_mutex_destroy(svgascreen->tex_mutex);
svgascreen->sws->destroy(svgascreen->sws);
FREE(svgascreen);
}
示例6: radeon_winsys_destroy
static void radeon_winsys_destroy(struct radeon_winsys *rws)
{
struct radeon_drm_winsys *ws = (struct radeon_drm_winsys*)rws;
pipe_mutex_destroy(ws->hyperz_owner_mutex);
pipe_mutex_destroy(ws->cmask_owner_mutex);
ws->cman->destroy(ws->cman);
ws->kman->destroy(ws->kman);
if (ws->gen >= R600) {
radeon_surface_manager_free(ws->surf_man);
}
FREE(rws);
}
示例7: stw_cleanup
void
stw_cleanup(void)
{
DHGLRC dhglrc;
debug_printf("%s\n", __FUNCTION__);
if (!stw_dev)
return;
/*
* Abort cleanup if there are still active contexts. In some situations
* this DLL may be unloaded before the DLL that is using GL contexts is.
*/
pipe_mutex_lock( stw_dev->ctx_mutex );
dhglrc = handle_table_get_first_handle(stw_dev->ctx_table);
pipe_mutex_unlock( stw_dev->ctx_mutex );
if (dhglrc) {
debug_printf("%s: contexts still active -- cleanup aborted\n", __FUNCTION__);
stw_dev = NULL;
return;
}
handle_table_destroy(stw_dev->ctx_table);
stw_framebuffer_cleanup();
pipe_mutex_destroy( stw_dev->fb_mutex );
pipe_mutex_destroy( stw_dev->ctx_mutex );
FREE(stw_dev->smapi);
stw_dev->stapi->destroy(stw_dev->stapi);
stw_dev->screen->destroy(stw_dev->screen);
/* glapi is statically linked: we can call the local destroy function. */
#ifdef _GLAPI_NO_EXPORTS
_glapi_destroy_multithread();
#endif
#ifdef DEBUG
debug_memory_end(stw_dev->memdbg_no);
#endif
stw_tls_cleanup();
stw_dev = NULL;
}
示例8: etna_screen_destroy
static void etna_screen_destroy( struct pipe_screen *screen )
{
struct etna_screen *priv = etna_screen(screen);
etna_screen_destroy_fences(screen);
pipe_mutex_destroy(priv->fence_mutex);
FREE(screen);
}
示例9: vmw_svga_winsys_surface_reference
void
vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst,
struct vmw_svga_winsys_surface *src)
{
struct pipe_reference *src_ref;
struct pipe_reference *dst_ref;
struct vmw_svga_winsys_surface *dst;
if(pdst == NULL || *pdst == src)
return;
dst = *pdst;
src_ref = src ? &src->refcnt : NULL;
dst_ref = dst ? &dst->refcnt : NULL;
if (pipe_reference(dst_ref, src_ref)) {
if (dst->buf)
vmw_svga_winsys_buffer_destroy(&dst->screen->base, dst->buf);
vmw_ioctl_surface_destroy(dst->screen, dst->sid);
#ifdef DEBUG
/* to detect dangling pointers */
assert(p_atomic_read(&dst->validated) == 0);
dst->sid = SVGA3D_INVALID_ID;
#endif
pipe_mutex_destroy(dst->mutex);
FREE(dst);
}
*pdst = src;
}
示例10: fenced_bufmgr_destroy
static void
fenced_bufmgr_destroy(struct pb_manager *mgr)
{
struct fenced_manager *fenced_mgr = fenced_manager(mgr);
pipe_mutex_lock(fenced_mgr->mutex);
/* Wait on outstanding fences */
while (fenced_mgr->num_fenced) {
pipe_mutex_unlock(fenced_mgr->mutex);
#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS)
sched_yield();
#endif
pipe_mutex_lock(fenced_mgr->mutex);
while(fenced_manager_check_signalled_locked(fenced_mgr, TRUE))
;
}
#ifdef DEBUG
/*assert(!fenced_mgr->num_unfenced);*/
#endif
pipe_mutex_unlock(fenced_mgr->mutex);
pipe_mutex_destroy(fenced_mgr->mutex);
if(fenced_mgr->provider)
fenced_mgr->provider->destroy(fenced_mgr->provider);
fenced_mgr->ops->destroy(fenced_mgr->ops);
FREE(fenced_mgr);
}
示例11: util_ringbuffer_destroy
void util_ringbuffer_destroy( struct util_ringbuffer *ring )
{
pipe_condvar_destroy(ring->change);
pipe_mutex_destroy(ring->mutex);
FREE(ring->buf);
FREE(ring);
}
示例12: radeon_bomgr_destroy
static void radeon_bomgr_destroy(struct pb_manager *_mgr)
{
struct radeon_bomgr *mgr = radeon_bomgr(_mgr);
util_hash_table_destroy(mgr->bo_handles);
pipe_mutex_destroy(mgr->bo_handles_mutex);
FREE(mgr);
}
示例13: si_destroy_screen
static void si_destroy_screen(struct pipe_screen* pscreen)
{
struct si_screen *sscreen = (struct si_screen *)pscreen;
struct si_shader_part *parts[] = {
sscreen->vs_prologs,
sscreen->vs_epilogs,
sscreen->tcs_epilogs,
sscreen->ps_prologs,
sscreen->ps_epilogs
};
unsigned i;
if (!sscreen)
return;
if (!sscreen->b.ws->unref(sscreen->b.ws))
return;
/* Free shader parts. */
for (i = 0; i < ARRAY_SIZE(parts); i++) {
while (parts[i]) {
struct si_shader_part *part = parts[i];
parts[i] = part->next;
radeon_shader_binary_clean(&part->binary);
FREE(part);
}
}
pipe_mutex_destroy(sscreen->shader_parts_mutex);
si_destroy_shader_cache(sscreen);
r600_destroy_common_screen(&sscreen->b);
}
示例14: stw_framebuffer_destroy_locked
/**
* Destroy this framebuffer. Both stw_dev::fb_mutex and stw_framebuffer::mutex
* must be held, by this order. If there are still references to the
* framebuffer, nothing will happen.
*/
static INLINE void
stw_framebuffer_destroy_locked(
struct stw_framebuffer *fb )
{
struct stw_framebuffer **link;
/* check the reference count */
fb->refcnt--;
if (fb->refcnt) {
pipe_mutex_unlock( fb->mutex );
return;
}
link = &stw_dev->fb_head;
while (*link != fb)
link = &(*link)->next;
assert(*link);
*link = fb->next;
fb->next = NULL;
if(fb->shared_surface)
stw_dev->stw_winsys->shared_surface_close(stw_dev->screen, fb->shared_surface);
stw_st_destroy_framebuffer_locked(fb->stfb);
ReleaseDC(fb->hWnd, fb->hDC);
pipe_mutex_unlock( fb->mutex );
pipe_mutex_destroy( fb->mutex );
FREE( fb );
}
示例15: lp_scene_destroy
/**
* Free all data associated with the given scene, and the scene itself.
*/
void
lp_scene_destroy(struct lp_scene *scene)
{
pipe_mutex_destroy(scene->mutex);
assert(scene->data.head->next == NULL);
FREE(scene->data.head);
FREE(scene);
}