diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-07-06 18:23:37 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-07-06 18:23:37 +0100 |
commit | 1068c15c61a6c76a2da04ed3ca136f0d49abed1d (patch) | |
tree | a06dec9defa063c5b39826e9769ed2ef408d20bf /src/gallium/state_trackers/wgl/shared/stw_device.h | |
parent | 6f4167c8a215b561e5ad6eb58a8d875a5b8d8d6a (diff) |
wgl: Make the stw_framebuffer destructions threadsafe.
Ensure no other thread is accessing a framebuffer when it is being destroyed by
acquiring both the global and per-framebuffer mutexes. Normal access only
needs the global lock to walk the linked list and acquire the per-framebuffer
mutex.
Diffstat (limited to 'src/gallium/state_trackers/wgl/shared/stw_device.h')
-rw-r--r-- | src/gallium/state_trackers/wgl/shared/stw_device.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/wgl/shared/stw_device.h b/src/gallium/state_trackers/wgl/shared/stw_device.h index e097f1f71e..e1bb9518dd 100644 --- a/src/gallium/state_trackers/wgl/shared/stw_device.h +++ b/src/gallium/state_trackers/wgl/shared/stw_device.h @@ -57,10 +57,10 @@ struct stw_device unsigned pixelformat_count; unsigned pixelformat_extended_count; - pipe_mutex mutex; - + pipe_mutex ctx_mutex; struct handle_table *ctx_table; + pipe_mutex fb_mutex; struct stw_framebuffer *fb_head; #ifdef DEBUG |