taskmgr: Give a name and statically initialize PerfDataCriticalSection.
Francois Gouget
fgouget at codeweavers.com
Wed Jul 3 05:15:17 CDT 2013
---
programs/taskmgr/perfdata.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/programs/taskmgr/perfdata.c b/programs/taskmgr/perfdata.c
index 95516de..9e639d4 100644
--- a/programs/taskmgr/perfdata.c
+++ b/programs/taskmgr/perfdata.c
@@ -34,6 +34,14 @@ static PROCNTQSI NtQuerySystemInformation = NULL;
static PROCGGR pGetGuiResources = NULL;
static PROCGPIC pGetProcessIoCounters = NULL;
static CRITICAL_SECTION PerfDataCriticalSection;
+static CRITICAL_SECTION_DEBUG PerfDataCriticalSection_debug =
+{
+ 0, 0, &PerfDataCriticalSection,
+ { &PerfDataCriticalSection_debug.ProcessLocksList, &PerfDataCriticalSection_debug.ProcessLocksList },
+ 0, 0, { (DWORD_PTR)(__FILE__ ": PerfDataCriticalSection") }
+};
+static CRITICAL_SECTION PerfDataCriticalSection = { &PerfDataCriticalSection_debug, -1, 0, 0, 0, 0 };
+;
static PPERFDATA pPerfDataOld = NULL; /* Older perf data (saved to establish delta values) */
static PPERFDATA pPerfData = NULL; /* Most recent copy of perf data */
static ULONG ProcessCountOld = 0;
@@ -60,9 +68,7 @@ BOOL PerfDataInitialize(void)
NtQuerySystemInformation = (PROCNTQSI)GetProcAddress(GetModuleHandleW(wszNtdll), "NtQuerySystemInformation");
pGetGuiResources = (PROCGGR)GetProcAddress(GetModuleHandleW(wszUser32), "GetGuiResources");
pGetProcessIoCounters = (PROCGPIC)GetProcAddress(GetModuleHandleW(wszKernel32), "GetProcessIoCounters");
-
- InitializeCriticalSection(&PerfDataCriticalSection);
-
+
if (!NtQuerySystemInformation)
return FALSE;
--
1.7.10.4
More information about the wine-patches
mailing list