X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fstate_trackers%2Fwgl%2Fstw_device.h;h=f271762f6b16a09e98fff24994990dd5b48b2015;hb=fa30de7643ca6c70ac2661684b22f7b220a40b0b;hp=e35a4b94036f14f131e61495957febee9f547efd;hpb=a2a1a5805fd617e7f3cc8be44dd79b50da07ebb9;p=mesa.git diff --git a/src/gallium/state_trackers/wgl/stw_device.h b/src/gallium/state_trackers/wgl/stw_device.h index e35a4b94036..f271762f6b1 100644 --- 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; - pipe_mutex ctx_mutex; + CRITICAL_SECTION ctx_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_ */