本文整理汇总了C++中pipe_mutex_destroy函数的典型用法代码示例。如果您正苦于以下问题:C++ pipe_mutex_destroy函数的具体用法?C++ pipe_mutex_destroy怎么用?C++ pipe_mutex_destroy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pipe_mutex_destroy函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:CSRedRat,项目名称:mesa-1,代码行数:30,代码来源:radeon_drm_winsys.c
示例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);
}
开发者ID:utkarshayachit,项目名称:openswr-mesa,代码行数:26,代码来源:radeon_drm_winsys.c
示例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);
}
开发者ID:hakzsam,项目名称:mesa,代码行数:12,代码来源:r600_pipe_common.c
示例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);
}
开发者ID:BNieuwenhuizen,项目名称:mesa,代码行数:14,代码来源:virgl_drm_winsys.c
示例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);
}
开发者ID:gqmelo,项目名称:mesa,代码行数:14,代码来源:svga_screen.c
示例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);
}
开发者ID:FASTCHIP,项目名称:kernel_3.4.67_lenovo_s939_mtk6592,代码行数:14,代码来源:radeon_drm_winsys.c
示例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;
}
开发者ID:Sheph,项目名称:mesa,代码行数:48,代码来源:stw_device.c
示例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);
}
开发者ID:jluebbe,项目名称:etna_viv,代码行数:7,代码来源:etna_screen.c
示例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;
}
开发者ID:ashmew2,项目名称:kolibriosSVN,代码行数:31,代码来源:vmw_surface.c
示例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);
}
开发者ID:CPFDSoftware-Tony,项目名称:gmv,代码行数:32,代码来源:pb_buffer_fenced.c
示例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);
}
开发者ID:1065672644894730302,项目名称:Chromium,代码行数:7,代码来源:u_ringbuffer.c
示例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);
}
开发者ID:nikai3d,项目名称:mesa,代码行数:7,代码来源:radeon_drm_bo.c
示例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);
}
开发者ID:BNieuwenhuizen,项目名称:mesa,代码行数:32,代码来源:si_pipe.c
示例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 );
}
开发者ID:RareHare,项目名称:reactos,代码行数:38,代码来源:stw_framebuffer.c
示例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);
}
开发者ID:1065672644894730302,项目名称:Chromium,代码行数:11,代码来源:lp_scene.c
示例16: lp_scene_destroy
/**
* Free all data associated with the given scene, and the scene itself.
*/
void
lp_scene_destroy(struct lp_scene *scene)
{
lp_fence_reference(&scene->fence, NULL);
pipe_mutex_destroy(scene->mutex);
assert(scene->data.head->next == NULL);
FREE(scene->data.head);
FREE(scene);
}
开发者ID:Forzaferrarileo,项目名称:mesa,代码行数:12,代码来源:lp_scene.c
示例17: lp_fence_destroy
/** Destroy a fence. Called when refcount hits zero. */
void
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);
FREE(fence);
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:11,代码来源:lp_fence.c
示例18: virgl_vtest_winsys_destroy
static void
virgl_vtest_winsys_destroy(struct virgl_winsys *vws)
{
struct virgl_vtest_winsys *vtws = virgl_vtest_winsys(vws);
virgl_cache_flush(vtws);
pipe_mutex_destroy(vtws->mutex);
FREE(vtws);
}
开发者ID:Distrotech,项目名称:Mesa,代码行数:10,代码来源:virgl_vtest_winsys.c
示例19: util_queue_destroy
void
util_queue_destroy(struct util_queue *queue)
{
queue->kill_thread = 1;
pipe_semaphore_signal(&queue->queued);
pipe_thread_wait(queue->thread);
pipe_semaphore_destroy(&queue->has_space);
pipe_semaphore_destroy(&queue->queued);
pipe_mutex_destroy(queue->lock);
}
开发者ID:airlied,项目名称:mesa,代码行数:10,代码来源:u_queue.c
示例20: stw_cleanup
void
stw_cleanup(void)
{
unsigned i;
debug_printf("%s\n", __FUNCTION__);
if (!stw_dev)
return;
pipe_mutex_lock( stw_dev->ctx_mutex );
{
/* Ensure all contexts are destroyed */
i = handle_table_get_first_handle(stw_dev->ctx_table);
while (i) {
stw_delete_context(i);
i = handle_table_get_next_handle(stw_dev->ctx_table, i);
}
handle_table_destroy(stw_dev->ctx_table);
}
pipe_mutex_unlock( stw_dev->ctx_mutex );
stw_framebuffer_cleanup();
pipe_mutex_destroy( stw_dev->fb_mutex );
pipe_mutex_destroy( stw_dev->ctx_mutex );
stw_dev->screen->destroy(stw_dev->screen);
#ifdef WIN32_THREADS
_glthread_DESTROY_MUTEX(OneTimeLock);
FreeAllTSD();
#endif
#ifdef DEBUG
debug_memory_end(stw_dev->memdbg_no);
#endif
stw_tls_cleanup();
stw_dev = NULL;
}
开发者ID:toastpp,项目名称:toastpp,代码行数:42,代码来源:stw_device.c
注:本文中的pipe_mutex_destroy函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论