diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-06-14 11:52:38 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-06-15 10:26:51 +0200 |
commit | e1b8eabeee354822fc0a413dd097210b621eb73a (patch) | |
tree | cef9617386ffd14ee9139e056c20919d66b2ed88 /linux-core/drm_objects.h | |
parent | 2407ce57de36470e767ebc1800cbbec74cab0ae4 (diff) |
Locking fixes and instrumentation.
Diffstat (limited to 'linux-core/drm_objects.h')
-rw-r--r-- | linux-core/drm_objects.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux-core/drm_objects.h b/linux-core/drm_objects.h index 42c8e536..59c8902d 100644 --- a/linux-core/drm_objects.h +++ b/linux-core/drm_objects.h @@ -473,4 +473,12 @@ extern int drm_bo_move_accel_cleanup(drm_buffer_object_t * bo, uint32_t fence_flags, drm_bo_mem_reg_t * new_mem); +#ifdef CONFIG_DEBUG_MUTEXES +#define DRM_ASSERT_LOCKED(_mutex) \ + BUG_ON(!mutex_is_locked(_mutex) || \ + ((_mutex)->owner != current_thread_info())) +#else +#define DRM_ASSERT_LOCKED(_mutex) +#endif + #endif |