Rev 9593 | Rev 9611 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9593 | Rev 9600 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;; |
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
4 | ;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; Distributed under terms of the GNU General Public License ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 9593 $ |
8 | $Revision: 9600 $ |
9 | 9 | ||
10 | 10 | ||
Line 66... | Line 66... | ||
66 | ; event_sched dd ? |
66 | ; event_sched dd ? |
67 | endg |
67 | endg |
Line 68... | Line 68... | ||
68 | 68 | ||
69 | align 4 |
69 | align 4 |
70 | update_counters: |
70 | update_counters: |
71 | mov edi, [TASK_BASE] |
71 | ;mov edi, [TASK_BASE] |
72 | mov esi, [current_slot] |
72 | mov esi, [current_slot] |
73 | rdtsc |
73 | rdtsc |
74 | sub eax, [edi+TASKDATA.counter_add] ; time stamp counter add |
74 | ;sub eax, [edi+TASKDATA.counter_add] ; time stamp counter add |
- | 75 | ;add [edi+TASKDATA.counter_sum], eax ; counter sum |
|
75 | ;add [edi+TASKDATA.counter_sum], eax ; counter sum |
76 | sub eax, [esi-sizeof.APPDATA+APPDATA.counter_add] ; time stamp counter add |
76 | add [esi-sizeof.APPDATA+APPDATA.counter_sum], eax ; counter sum |
77 | add [esi-sizeof.APPDATA+APPDATA.counter_sum], eax ; counter sum |
77 | ret |
78 | ret |
78 | align 4 |
79 | align 4 |
79 | updatecputimes: |
80 | updatecputimes: |
Line 335... | Line 336... | ||
335 | ; the line below assumes APPDATA is 256 bytes long and SLOT_BASE is |
336 | ; the line below assumes APPDATA is 256 bytes long and SLOT_BASE is |
336 | ; aligned on 0x10000 |
337 | ; aligned on 0x10000 |
337 | mov byte [current_slot_idx], bh |
338 | mov byte [current_slot_idx], bh |
338 | mov [TASK_BASE], edi |
339 | mov [TASK_BASE], edi |
339 | rdtsc ;call _rdtsc |
340 | rdtsc ;call _rdtsc |
- | 341 | mov [ebx-sizeof.APPDATA+APPDATA.counter_add], eax; for next using update_counters |
|
340 | mov [edi+TASKDATA.counter_add], eax; for next using update_counters |
342 | ;mov [edi+TASKDATA.counter_add], eax; for next using update_counters |
341 | cmp ebx, [current_slot] |
343 | cmp ebx, [current_slot] |
342 | ret |
344 | ret |
343 | .task_next: |
345 | .task_next: |
344 | cmp ebx, [scheduler_current+ecx*4] |
346 | cmp ebx, [scheduler_current+ecx*4] |
345 | jnz .task_loop |
347 | jnz .task_loop |