summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_common_context.h
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2009-07-30 20:17:29 +0300
committerAlex Deucher <alexdeucher@gmail.com>2009-08-12 14:14:29 -0400
commit29173d3d5cf02d58e720b5c7fe48a0630c7d5d5f (patch)
treeafaf64a351d5f451de6e9cd12191c25079888f38 /src/mesa/drivers/dri/radeon/radeon_common_context.h
parent5eeb44f3983dfda2f2707783be12806da795cbcd (diff)
radeon: Add protection against recursive DRM locking.
Reference counting protects DRM lock call from recursive locking that would cause hang. Code also adds optional debugging output for recursive call that is compiled only if NDEBUG is not defined. This code is not 100% thread safe because mesa doesn't include increment and test atomic operation. There is built-in gcc functions but they are only available from gcc 4.2.
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_common_context.h')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h
index d7e94a6894..f8e1a25c9f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -365,6 +365,7 @@ struct radeon_dri_mirror {
drm_context_t hwContext;
drm_hw_lock_t *hwLock;
+ int hwLockCount;
int fd;
int drmMinor;
};