projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
st/wgl: re-implement stw_device::ctx_mutex with CRITICAL_SECTION
[mesa.git]
/
src
/
gallium
/
state_trackers
/
wgl
/
stw_device.h
diff --git
a/src/gallium/state_trackers/wgl/stw_device.h
b/src/gallium/state_trackers/wgl/stw_device.h
index e35a4b94036f14f131e61495957febee9f547efd..f271762f6b16a09e98fff24994990dd5b48b2015 100644
(file)
--- a/
src/gallium/state_trackers/wgl/stw_device.h
+++ b/
src/gallium/state_trackers/wgl/stw_device.h
@@
-65,7
+65,7
@@
struct stw_device
GLCALLBACKTABLE callbacks;
GLCALLBACKTABLE callbacks;
-
pipe_mutex
ctx_mutex;
+
CRITICAL_SECTION
ctx_mutex;
struct handle_table *ctx_table;
pipe_mutex fb_mutex;
struct handle_table *ctx_table;
pipe_mutex fb_mutex;
@@
-89,4
+89,18
@@
stw_lookup_context_locked( DHGLRC dhglrc )
}
}
+static inline void
+stw_lock_contexts(struct stw_device *stw_dev)
+{
+ EnterCriticalSection(&stw_dev->ctx_mutex);
+}
+
+
+static inline void
+stw_unlock_contexts(struct stw_device *stw_dev)
+{
+ LeaveCriticalSection(&stw_dev->ctx_mutex);
+}
+
+
#endif /* STW_DEVICE_H_ */
#endif /* STW_DEVICE_H_ */