wgl: Make the stw_framebuffer destructions threadsafe.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 6 Jul 2009 17:23:37 +0000 (18:23 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 6 Jul 2009 17:23:37 +0000 (18:23 +0100)
commit1068c15c61a6c76a2da04ed3ca136f0d49abed1d
treea06dec9defa063c5b39826e9769ed2ef408d20bf
parent6f4167c8a215b561e5ad6eb58a8d875a5b8d8d6a
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.
src/gallium/state_trackers/wgl/shared/stw_context.c
src/gallium/state_trackers/wgl/shared/stw_device.c
src/gallium/state_trackers/wgl/shared/stw_device.h
src/gallium/state_trackers/wgl/shared/stw_framebuffer.c
src/gallium/state_trackers/wgl/shared/stw_framebuffer.h