diff options
author | Maarten Lankhorst <maarten.lankhorst@ubuntu.com> | 2014-03-12 22:05:15 -0400 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-04-15 10:29:49 +0200 |
commit | b1d4def05992bf061d6e0cc901ca00b7995e8d75 (patch) | |
tree | cc29141d297e19a395ac52e14d1e84e508f1cf94 /nouveau/private.h | |
parent | 504d606275edbc86b045492f1757c3cd82c298c4 (diff) | |
download | libdrm-b1d4def05992bf061d6e0cc901ca00b7995e8d75.tar.gz libdrm-b1d4def05992bf061d6e0cc901ca00b7995e8d75.tar.bz2 libdrm-b1d4def05992bf061d6e0cc901ca00b7995e8d75.zip |
nouveau: safen up nouveau_device list usage against concurrent access
I cannot make nouveau_bo_wrap thread-safe (by design), but it seems to be used to convert
drm fb's to nouveau_bo's and to get a notify handle from fifo->notify in nv30_screen.c
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Diffstat (limited to 'nouveau/private.h')
-rw-r--r-- | nouveau/private.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nouveau/private.h b/nouveau/private.h index 60714b8e..4f337ad1 100644 --- a/nouveau/private.h +++ b/nouveau/private.h @@ -3,6 +3,7 @@ #include <xf86drm.h> #include <xf86atomic.h> +#include <pthread.h> #include "nouveau_drm.h" #include "nouveau.h" @@ -94,7 +95,7 @@ nouveau_bo(struct nouveau_bo *bo) struct nouveau_device_priv { struct nouveau_device base; int close; - atomic_t lock; + pthread_mutex_t lock; struct nouveau_list bo_list; uint32_t *client; int nr_client; |