From 2db49164402e49d828ffa9cbbd1e868d29e746c1 Mon Sep 17 00:00:00 2001 From: Doczom Date: Sat, 8 Jan 2022 01:28:53 +0000 Subject: [PATCH] fix cpu_usage git-svn-id: svn://kolibrios.org@9592 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 6788db4488..cf7637edb6 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -1547,15 +1547,17 @@ draw_num_text: add edx, esp mov ebx, [esp+64+32-8+4] ; add window start x & y - mov ecx, [TASK_BASE] + ;mov ecx, [TASK_BASE] mov edi, [current_slot_idx] + mov ecx, edi shl edi, 8 + shl ecx, 5 - mov eax, [ecx-twdw+WDATA.box.left] + mov eax, [ecx+window_data+WDATA.box.left] add eax, [edi+SLOT_BASE+APPDATA.wnd_clientbox.left] shl eax, 16 - add eax, [ecx-twdw+WDATA.box.top] + add eax, [ecx+window_data+WDATA.box.top] add eax, [edi+SLOT_BASE+APPDATA.wnd_clientbox.top] add ebx, eax mov ecx, [esp+64+32-12+4] @@ -2625,7 +2627,7 @@ sys_cpuusage: ; +0: dword: memory usage ;mov eax, [ecx+TASK_TABLE+TASKDATA.cpu_usage] - mov eax, [ecx+SLOT_BASE+APPDATA.cpu_usage] + mov eax, [ecx-sizeof.APPDATA+SLOT_BASE+APPDATA.cpu_usage] mov [ebx], eax ; +10: 11 bytes: name of the process push ecx