diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-09-05 19:36:45 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-09-05 19:36:45 +0200 |
commit | e3f54ecdd9d266607afd7d8b62960b2154b63e9d (patch) | |
tree | 54697b5de7468b353e12d6c812b34e0dcb0f772a /libdrm/xf86mm.h | |
parent | 604215396847a7964fd7d68aa89d4f778b3bf22b (diff) |
Multithreaded application note.
Diffstat (limited to 'libdrm/xf86mm.h')
-rw-r--r-- | libdrm/xf86mm.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h index 623f4d58..43ea71b8 100644 --- a/libdrm/xf86mm.h +++ b/libdrm/xf86mm.h @@ -32,6 +32,18 @@ #include "drm.h" /* + * Note on multithreaded applications using this interface. + * Libdrm is not threadsafe, so common buffer, TTM, and fence objects need to + * be protected using an external mutex. + * + * Note: Don't protect the following functions, as it may lead to deadlocks: + * drmBOUnmap(), drmFenceBuffers(). + * The kernel is synchronizing and refcounting buffer maps. + * User space only needs to refcount object usage within the same application. + */ + + +/* * List macros heavily inspired by the Linux kernel * list handling. No list looping yet. */ @@ -82,6 +94,7 @@ typedef struct _drmMMListHead ((__type *)(((char *) (__item)) - offsetof(__type, __field))) + typedef struct _drmBO{ drm_bo_type_t type; unsigned handle; |