[TASKMGR]

protect some variables with the critical section
Patch by Mark Jansen.
CORE-10787

svn path=/trunk/; revision=70662
This commit is contained in:
Sylvain Petreolle 2016-01-30 17:01:04 +00:00
parent 4dd9a543a3
commit 2076f09a0c

View file

@ -477,17 +477,29 @@ ULONG PerfDataGetProcessIndex(ULONG pid)
ULONG PerfDataGetProcessCount(void)
{
return ProcessCount;
ULONG Result;
EnterCriticalSection(&PerfDataCriticalSection);
Result = ProcessCount;
LeaveCriticalSection(&PerfDataCriticalSection);
return Result;
}
ULONG PerfDataGetProcessorUsage(void)
{
return (ULONG)dbIdleTime;
ULONG Result;
EnterCriticalSection(&PerfDataCriticalSection);
Result = (ULONG)dbIdleTime;
LeaveCriticalSection(&PerfDataCriticalSection);
return Result;
}
ULONG PerfDataGetProcessorSystemUsage(void)
{
return (ULONG)dbKernelTime;
ULONG Result;
EnterCriticalSection(&PerfDataCriticalSection);
Result = (ULONG)dbKernelTime;
LeaveCriticalSection(&PerfDataCriticalSection);
return Result;
}
BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, ULONG nMaxCount)