Francois Gouget : qmgr: Give a name to the critical sections.

Alexandre Julliard julliard at winehq.org
Mon Nov 14 13:34:00 CST 2011


Module: wine
Branch: master
Commit: 7a30fbdcbfac8c7b13c76497af7c36561c72b909
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7a30fbdcbfac8c7b13c76497af7c36561c72b909

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Nov 14 15:10:44 2011 +0100

qmgr: Give a name to the critical sections.

---

 dlls/qmgr/job.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c
index 09693a3..9d8d928 100644
--- a/dlls/qmgr/job.c
+++ b/dlls/qmgr/job.c
@@ -30,6 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qmgr);
 
 static void BackgroundCopyJobDestructor(BackgroundCopyJobImpl *This)
 {
+    This->cs.DebugInfo->Spare[0] = 0;
     DeleteCriticalSection(&This->cs);
     HeapFree(GetProcessHeap(), 0, This->displayName);
     HeapFree(GetProcessHeap(), 0, This);
@@ -577,6 +578,8 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type,
 
     This->lpVtbl = &BITS_IBackgroundCopyJob_Vtbl;
     InitializeCriticalSection(&This->cs);
+    This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BackgroundCopyJobImpl.cs");
+
     This->ref = 1;
     This->type = type;
 
@@ -584,6 +587,7 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type,
     This->displayName = HeapAlloc(GetProcessHeap(), 0, n);
     if (!This->displayName)
     {
+        This->cs.DebugInfo->Spare[0] = 0;
         DeleteCriticalSection(&This->cs);
         HeapFree(GetProcessHeap(), 0, This);
         return E_OUTOFMEMORY;
@@ -593,6 +597,7 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type,
     hr = CoCreateGuid(&This->jobId);
     if (FAILED(hr))
     {
+        This->cs.DebugInfo->Spare[0] = 0;
         DeleteCriticalSection(&This->cs);
         HeapFree(GetProcessHeap(), 0, This->displayName);
         HeapFree(GetProcessHeap(), 0, This);




More information about the wine-cvs mailing list