https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8e01dee25155b8edc256f…
commit 8e01dee25155b8edc256f7d2239f8fb22496a543
Author: Eugen Podrug <eugen.podrug(a)gmail.com>
AuthorDate: Tue Jan 24 05:42:03 2023 +0100
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sun Jul 2 16:10:36 2023 +0300
[NTOS:EX] Fix swapped values in ExGetCurrentProcessorCounts() (#4565)
The function should return the kernel time for the idle thread in the
first argument, and kernel time + user time for the current thread in
the second argument.
Also retrieve the processor number from the cached PRCB instead of
calling KeGetCurrentProcessorNumber() which retrieves the PRCB again
since the processor could switch in-between those calls.
NdisGetCurrentProcessorCounts() function follows the same prototype
which is the correct one.
---
drivers/network/ndis/include/ndissys.h | 4 ++--
ntoskrnl/ex/sysinfo.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/network/ndis/include/ndissys.h b/drivers/network/ndis/include/ndissys.h
index b80a6a0bbfa..7d5dbb0740a 100644
--- a/drivers/network/ndis/include/ndissys.h
+++ b/drivers/network/ndis/include/ndissys.h
@@ -45,8 +45,8 @@
VOID
NTAPI
ExGetCurrentProcessorCounts(
- PULONG ThreadKernelTime,
- PULONG TotalCpuTime,
+ PULONG IdleTime,
+ PULONG KernelAndUserTime,
PULONG ProcessorNumber);
VOID
diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c
index ecf6380dd8b..d6692bc83f6 100644
--- a/ntoskrnl/ex/sysinfo.c
+++ b/ntoskrnl/ex/sysinfo.c
@@ -342,17 +342,17 @@ ExGetCurrentProcessorCpuUsage(PULONG CpuUsage)
*/
VOID
NTAPI
-ExGetCurrentProcessorCounts(PULONG ThreadKernelTime,
- PULONG TotalCpuTime,
+ExGetCurrentProcessorCounts(PULONG IdleTime,
+ PULONG KernelAndUserTime,
PULONG ProcessorNumber)
{
PKPRCB Prcb;
Prcb = KeGetCurrentPrcb();
- *ThreadKernelTime = Prcb->KernelTime + Prcb->UserTime;
- *TotalCpuTime = Prcb->CurrentThread->KernelTime;
- *ProcessorNumber = KeGetCurrentProcessorNumber();
+ *IdleTime = Prcb->IdleThread->KernelTime;
+ *KernelAndUserTime = Prcb->KernelTime + Prcb->UserTime;
+ *ProcessorNumber = (ULONG)Prcb->Number;
}
/*
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bc85db7d8c326549d5873…
commit bc85db7d8c326549d5873e59c35927d7976cd26a
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Sun Jul 2 16:02:19 2023 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sun Jul 2 16:02:19 2023 +0300
[IPCONFIG] Update Russian (ru-RU) translation
---
base/applications/network/ipconfig/lang/ru-RU.rc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/base/applications/network/ipconfig/lang/ru-RU.rc b/base/applications/network/ipconfig/lang/ru-RU.rc
index 340b40921d6..c365b1d37f3 100644
--- a/base/applications/network/ipconfig/lang/ru-RU.rc
+++ b/base/applications/network/ipconfig/lang/ru-RU.rc
@@ -84,12 +84,12 @@ STRINGTABLE
BEGIN
IDS_DNSNORECORD "\tНет записей типа %ls\n\n"
IDS_DNSNONAME "\tИмя не существует.\n\n"
- IDS_DNSFLUSHERROR "Не удается очистить кэш распознавателя DNS: "
+ IDS_DNSFLUSHERROR "Не удаётся очистить кэш распознавателя DNS: "
IDS_DNSFLUSHSUCCESS "Успешно сброшен кэш распознавателя DNS.\n"
- IDS_DHCPNOTCONNECTED "No operation can be performed on %ls while it has its media disconnected.\n"
- IDS_DHCPNOTENABLED "Adapter %ls is not enabled for DHCP.\n"
- IDS_DHCPNOADAPTER "The operation failed as no adapter is in the state permissible for \nthis operation.\n"
- IDS_DHCPRELEASED "IP Address for adapter %ls has already been released.\n"
+ IDS_DHCPNOTCONNECTED "Операции не могут быть выполнены на ""%ls"", до тех пор, пока сеть отключена.\n"
+ IDS_DHCPNOTENABLED "Адаптер ""%ls"" не доступен для DHCP.\n"
+ IDS_DHCPNOADAPTER "Операция завершена с ошибкой, поскольку ни один адаптер\nне находился в состоянии, допустимом для её выполнения.\n"
+ IDS_DHCPRELEASED "IP-адрес для адаптера ""%ls"" уже освобождён.\n"
END
STRINGTABLE