mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[TASKMGR]
protect some variables with the critical section Patch by Mark Jansen. CORE-10787 svn path=/trunk/; revision=70662
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user