[5/6] wined3d: Make CreateFakeGLContext thread safe.
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Nov 21 05:10:30 CST 2006
"Jan Zerebecki" <jan.wine at zerebecki.de> wrote:
> static void WineD3D_ReleaseFakeGLContext(void) {
> GLXContext glCtx;
>
> + EnterCriticalSection(&wined3d_fake_gl_context_cs);
> +
> if(!wined3d_fake_gl_context_available) {
> TRACE_(d3d_caps)("context not available\n");
> + LeaveCriticalSection(&wined3d_fake_gl_context_cs);
> return;
> }
You could avoid a call to LeaveCriticalSection by moving EnterCriticalSection
after the wined3d_fake_gl_context_available check.
--
Dmitry.
More information about the wine-devel
mailing list