mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +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:
parent
4dd9a543a3
commit
2076f09a0c
1 changed files with 15 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue