replacing TASKDATA.cpu_usage with APPDATA.cpu_usage

git-svn-id: svn://kolibrios.org@9590 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Doczom 2022-01-07 21:53:56 +00:00
parent 7664139794
commit bb2c454ebe
2 changed files with 11 additions and 6 deletions

View File

@ -76,12 +76,15 @@ update_counters:
align 4
updatecputimes:
mov ecx, [thread_count]
mov edi, TASK_DATA
;mov edi, TASK_DATA
mov edi, SLOT_BASE
.newupdate:
xor eax, eax
xchg eax, [edi+TASKDATA.counter_sum]
mov [edi+TASKDATA.cpu_usage], eax
add edi, 0x20
;mov [edi+TASKDATA.cpu_usage], eax
;add edi, 0x20
mov [edi+APPDATA.cpu_usage], eax
add edi, 0x100 ;sizeof.APPDATA
loop .newupdate
ret

View File

@ -2235,7 +2235,8 @@ sysfn_zmodif:
;------------------------------------------------------------------------------
sysfn_getidletime: ; 18.4 = GET IDLETIME
mov eax, [TASK_TABLE+32+TASKDATA.cpu_usage]
;mov eax, [TASK_TABLE+32+TASKDATA.cpu_usage]
mov eax, [SLOT_BASE+APPDATA.cpu_usage]
mov [esp+32], eax
ret
;------------------------------------------------------------------------------
@ -2620,10 +2621,11 @@ sys_cpuusage:
mov ax, [WIN_POS + ecx * 2]
mov [ebx+6], ax
shl ecx, 5
shl ecx, 8 ;5=32 8=256
; +0: dword: memory usage
mov eax, [ecx+TASK_TABLE+TASKDATA.cpu_usage]
;mov eax, [ecx+TASK_TABLE+TASKDATA.cpu_usage]
mov eax, [ecx+SLOT_BASE+APPDATA.cpu_usage]
mov [ebx], eax
; +10: 11 bytes: name of the process
push ecx