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
|
||||
update_counters:
|
||||
mov edi, [TASK_BASE]
|
||||
mov esi, [current_slot]
|
||||
rdtsc
|
||||
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
|
||||
align 4
|
||||
updatecputimes:
|
||||
mov ecx, [thread_count]
|
||||
mov edi, TASK_DATA
|
||||
;mov dword[edi+TASKDATA.cpu_usage], 0
|
||||
;mov edi, TASK_DATA
|
||||
mov esi, SLOT_BASE
|
||||
.newupdate:
|
||||
xor eax, eax
|
||||
xchg eax, [edi+TASKDATA.counter_sum]
|
||||
;xchg eax, [edi+TASKDATA.counter_sum]
|
||||
;mov [edi+TASKDATA.cpu_usage], eax
|
||||
add edi, 0x20
|
||||
xchg eax, [esi+APPDATA.counter_sum]
|
||||
;add edi, 0x20
|
||||
mov [esi+APPDATA.cpu_usage], eax
|
||||
add esi, 0x100 ;sizeof.APPDATA
|
||||
add esi, sizeof.APPDATA
|
||||
loop .newupdate
|
||||
ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user