Removed patches to use interlocked functions for library refcounts (accepted upstream).

This commit is contained in:
Sebastian Lackner
2015-03-02 16:17:41 +01:00
parent 3efff4cb88
commit e86c1653d8
10 changed files with 112 additions and 696 deletions

View File

@@ -1,79 +0,0 @@
From d8497e4ebc1fb5a3b703e4dd4474c65bbb25796d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 1 Mar 2015 03:46:06 +0100
Subject: browseui: Always use interlocked functions when accessing variable
BROWSEUI_refCount.
---
dlls/browseui/browseui_main.c | 4 ++--
dlls/browseui/compcatcachedaemon.c | 4 ++--
dlls/browseui/progressdlg.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/browseui/browseui_main.c b/dlls/browseui/browseui_main.c
index 78ce326..f509ee5 100644
--- a/dlls/browseui/browseui_main.c
+++ b/dlls/browseui/browseui_main.c
@@ -74,7 +74,7 @@ static void ClassFactory_Destructor(ClassFactory *This)
{
TRACE("Destroying class factory %p\n", This);
heap_free(This);
- BROWSEUI_refCount--;
+ InterlockedDecrement(&BROWSEUI_refCount);
}
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppvOut)
@@ -154,7 +154,7 @@ static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
This->ctor = ctor;
*ppvOut = This;
TRACE("Created class factory %p\n", This);
- BROWSEUI_refCount++;
+ InterlockedIncrement(&BROWSEUI_refCount);
return S_OK;
}
diff --git a/dlls/browseui/compcatcachedaemon.c b/dlls/browseui/compcatcachedaemon.c
index 0acb4ec..a5addd2 100644
--- a/dlls/browseui/compcatcachedaemon.c
+++ b/dlls/browseui/compcatcachedaemon.c
@@ -60,7 +60,7 @@ static void CompCatCacheDaemon_Destructor(CompCatCacheDaemon *This)
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs);
heap_free(This);
- BROWSEUI_refCount--;
+ InterlockedDecrement(&BROWSEUI_refCount);
}
static HRESULT WINAPI CompCatCacheDaemon_QueryInterface(IRunnableTask *iface, REFIID iid, LPVOID *ppvOut)
@@ -159,6 +159,6 @@ HRESULT CompCatCacheDaemon_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This;
- BROWSEUI_refCount++;
+ InterlockedIncrement(&BROWSEUI_refCount);
return S_OK;
}
diff --git a/dlls/browseui/progressdlg.c b/dlls/browseui/progressdlg.c
index 598197b..e61a4cc 100644
--- a/dlls/browseui/progressdlg.c
+++ b/dlls/browseui/progressdlg.c
@@ -268,7 +268,7 @@ static void ProgressDialog_Destructor(ProgressDialog *This)
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs);
heap_free(This);
- BROWSEUI_refCount--;
+ InterlockedDecrement(&BROWSEUI_refCount);
}
static HRESULT WINAPI ProgressDialog_QueryInterface(IProgressDialog *iface, REFIID iid, LPVOID *ppvOut)
@@ -574,6 +574,6 @@ HRESULT ProgressDialog_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This;
- BROWSEUI_refCount++;
+ InterlockedIncrement(&BROWSEUI_refCount);
return S_OK;
}
--
2.3.0