From 1068c15c61a6c76a2da04ed3ca136f0d49abed1d Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 6 Jul 2009 18:23:37 +0100 Subject: 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_device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/state_trackers/wgl/shared/stw_device.h') 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 -- cgit v1.2.3