Rev 3617 | Rev 5130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3617 | Rev 4700 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. 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: 3617 $ |
8 | $Revision: 4700 $ |
9 | 9 | ||
10 | 10 | ||
Line 27... | Line 27... | ||
27 | add [next_usage_update], 100 |
27 | add [next_usage_update], 100 |
28 | call updatecputimes |
28 | call updatecputimes |
29 | .nocounter: |
29 | .nocounter: |
30 | xor ecx, ecx ; send End Of Interrupt signal |
30 | xor ecx, ecx ; send End Of Interrupt signal |
31 | call irq_eoi |
31 | call irq_eoi |
32 | ; btr dword[DONT_SWITCH], 0 |
- | |
33 | ; jc .return |
- | |
- | 32 | ||
34 | mov bl, SCHEDULE_ANY_PRIORITY |
33 | mov bl, SCHEDULE_ANY_PRIORITY |
35 | call find_next_task |
34 | call find_next_task |
36 | jz .return ; if there is only one running process |
35 | jz .return ; if there is only one running process |
37 | call do_change_task |
36 | call do_change_task |
38 | .return: |
37 | .return: |
Line 42... | Line 41... | ||
42 | align 4 |
41 | align 4 |
43 | change_task: |
42 | change_task: |
44 | pushfd |
43 | pushfd |
45 | cli |
44 | cli |
46 | pushad |
45 | pushad |
47 | if 0 |
- | |
48 | ; \begin{Mario79} ; <- must be refractoried, if used... |
- | |
49 | cmp [dma_task_switched], 1 |
- | |
50 | jne .find_next_task |
- | |
51 | mov [dma_task_switched], 0 |
- | |
52 | mov ebx, [dma_process] |
- | |
53 | cmp [CURRENT_TASK], ebx |
- | |
54 | je .return |
- | |
55 | mov edi, [dma_slot_ptr] |
- | |
56 | mov [CURRENT_TASK], ebx |
- | |
57 | mov [TASK_BASE], edi |
- | |
58 | jmp @f |
- | |
59 | .find_next_task: |
- | |
60 | ; \end{Mario79} |
- | |
61 | end if |
- | |
62 | mov bl, SCHEDULE_ANY_PRIORITY |
46 | mov bl, SCHEDULE_ANY_PRIORITY |
63 | call find_next_task |
47 | call find_next_task |
64 | jz .return ; the same task -> skip switch |
48 | jz .return ; the same task -> skip switch |
65 | @@: |
49 | |
66 | ; mov byte[DONT_SWITCH], 1 |
- | |
67 | call do_change_task |
50 | call do_change_task |
68 | .return: |
51 | .return: |
69 | popad |
52 | popad |
70 | popfd |
53 | popfd |
71 | ret |
54 | ret |