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 align 4
updatecputimes: updatecputimes:
mov ecx, [thread_count] mov ecx, [thread_count]
mov edi, TASK_DATA ;mov edi, TASK_DATA
mov edi, SLOT_BASE
.newupdate: .newupdate:
xor eax, eax xor eax, eax
xchg eax, [edi+TASKDATA.counter_sum] xchg eax, [edi+TASKDATA.counter_sum]
mov [edi+TASKDATA.cpu_usage], eax ;mov [edi+TASKDATA.cpu_usage], eax
add edi, 0x20 ;add edi, 0x20
mov [edi+APPDATA.cpu_usage], eax
add edi, 0x100 ;sizeof.APPDATA
loop .newupdate loop .newupdate
ret ret

View File

@ -2235,7 +2235,8 @@ sysfn_zmodif:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
sysfn_getidletime: ; 18.4 = GET IDLETIME 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 mov [esp+32], eax
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -2620,10 +2621,11 @@ sys_cpuusage:
mov ax, [WIN_POS + ecx * 2] mov ax, [WIN_POS + ecx * 2]
mov [ebx+6], ax mov [ebx+6], ax
shl ecx, 5 shl ecx, 8 ;5=32 8=256
; +0: dword: memory usage ; +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 mov [ebx], eax
; +10: 11 bytes: name of the process ; +10: 11 bytes: name of the process
push ecx push ecx