forked from KolibriOS/kolibrios
replacing TASKDATA.counter_sum with APPDATA.counter_sum.
I hope the kernel is working git-svn-id: svn://kolibrios.org@9593 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
2db4916440
commit
100cb041bb
@ -69,23 +69,25 @@ endg
|
|||||||
align 4
|
align 4
|
||||||
update_counters:
|
update_counters:
|
||||||
mov edi, [TASK_BASE]
|
mov edi, [TASK_BASE]
|
||||||
|
mov esi, [current_slot]
|
||||||
rdtsc
|
rdtsc
|
||||||
sub eax, [edi+TASKDATA.counter_add] ; time stamp counter add
|
sub eax, [edi+TASKDATA.counter_add] ; time stamp counter add
|
||||||
add [edi+TASKDATA.counter_sum], eax ; counter sum
|
;add [edi+TASKDATA.counter_sum], eax ; counter sum
|
||||||
|
add [esi-sizeof.APPDATA+APPDATA.counter_sum], eax ; counter sum
|
||||||
ret
|
ret
|
||||||
align 4
|
align 4
|
||||||
updatecputimes:
|
updatecputimes:
|
||||||
mov ecx, [thread_count]
|
mov ecx, [thread_count]
|
||||||
mov edi, TASK_DATA
|
;mov edi, TASK_DATA
|
||||||
;mov dword[edi+TASKDATA.cpu_usage], 0
|
|
||||||
mov esi, SLOT_BASE
|
mov esi, 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
|
xchg eax, [esi+APPDATA.counter_sum]
|
||||||
|
;add edi, 0x20
|
||||||
mov [esi+APPDATA.cpu_usage], eax
|
mov [esi+APPDATA.cpu_usage], eax
|
||||||
add esi, 0x100 ;sizeof.APPDATA
|
add esi, sizeof.APPDATA
|
||||||
loop .newupdate
|
loop .newupdate
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user