Rev 8876 | Rev 9709 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8876 | Rev 9692 | ||
---|---|---|---|
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 | ;; Distributed under terms of the GNU General Public License. ;; |
4 | ;; Distributed under terms of the GNU General Public License. ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 8876 $ |
8 | $Revision: 9692 $ |
9 | 9 | ||
10 | align 4 ;3A08 |
10 | align 4 ;3A08 |
11 | build_interrupt_table: |
11 | build_interrupt_table: |
Line 178... | Line 178... | ||
178 | sar cl, 1 |
178 | sar cl, 1 |
179 | jc .l1 |
179 | jc .l1 |
180 | mov cl, 3 ; debug_message code=debug_exception |
180 | mov cl, 3 ; debug_message code=debug_exception |
181 | .notify: |
181 | .notify: |
182 | push ebx ; debug_message data |
182 | push ebx ; debug_message data |
183 | mov ebx, [TASK_BASE] |
183 | mov ebx, [current_slot] |
184 | push [ebx+TASKDATA.pid] ; PID |
184 | push [ebx + APPDATA.tid] ; PID |
185 | push ecx ; debug_message code ((here: ecx==1/3)) |
185 | push ecx ; debug_message code ((here: ecx==1/3)) |
186 | mov cl, 12 ; debug_message size |
186 | mov cl, 12 ; debug_message size |
187 | call debugger_notify ;; only ONE using, inline ??? SEE: core/debug.inc |
187 | call debugger_notify ;; only ONE using, inline ??? SEE: core/debug.inc |
188 | add esp, 12 |
188 | add esp, 12 |
189 | mov edx, [TASK_BASE] |
189 | mov edx, [TASK_BASE] |
Line 212... | Line 212... | ||
212 | mov ebx, ud_user_message |
212 | mov ebx, ud_user_message |
213 | mov ebp, notifyapp |
213 | mov ebp, notifyapp |
214 | call fs_execute_from_sysdir_param |
214 | call fs_execute_from_sysdir_param |
215 | pop ebx |
215 | pop ebx |
216 | .no_ud: |
216 | .no_ud: |
217 | mov edx, [TASK_BASE];not scratched below |
217 | mov edx, [current_slot];not scratched below |
218 | if lang eq sp |
218 | if lang eq sp |
219 | DEBUGF 1, "K : Proceso - terminado forzado PID: %x [%s]\n", [edx+TASKDATA.pid], [current_slot] |
219 | DEBUGF 1, "K : Proceso - terminado forzado PID: %x [%s]\n", [edx + APPDATA.tid], [current_slot] |
220 | else |
220 | else |
221 | DEBUGF 1, "K : Process - forced terminate PID: %x [%s]\n", [edx+TASKDATA.pid], [current_slot] |
221 | DEBUGF 1, "K : Process - forced terminate PID: %x [%s]\n", [edx + APPDATA.tid], [current_slot] |
222 | end if |
222 | end if |
223 | cmp bl, 0x08 |
223 | cmp bl, 0x08 |
224 | jb .l0 |
224 | jb .l0 |
225 | cmp bl, 0x11 |
225 | cmp bl, 0x11 |
226 | jbe .l1 |
226 | jbe .l1 |
Line 341... | Line 341... | ||
341 | push eax ecx edx |
341 | push eax ecx edx |
342 | mov ecx, application_table_mutex |
342 | mov ecx, application_table_mutex |
343 | call mutex_lock |
343 | call mutex_lock |
Line 344... | Line 344... | ||
344 | 344 | ||
345 | mov eax, [current_slot_idx] |
345 | mov eax, [current_slot_idx] |
346 | shl eax, BSF sizeof.TASKDATA |
346 | shl eax, BSF sizeof.APPDATA |
347 | add eax, TASK_TABLE+TASKDATA.pid |
- | |
Line 348... | Line 347... | ||
348 | mov eax, [eax] |
347 | mov eax, [eax + SLOT_BASE + APPDATA.tid] |
Line 349... | Line 348... | ||
349 | 348 | ||
Line 504... | Line 503... | ||
504 | add eax, 16 |
503 | add eax, 16 |
505 | cmp eax, hotkey_list+256*16 |
504 | cmp eax, hotkey_list+256*16 |
506 | jb .loop |
505 | jb .loop |
507 | ; get process PID |
506 | ; get process PID |
508 | mov eax, esi |
507 | mov eax, esi |
509 | shl eax, BSF sizeof.TASKDATA |
508 | shl eax, BSF sizeof.APPDATA |
510 | mov eax, [eax+TASK_TABLE+TASKDATA.pid] |
509 | mov eax, [eax + SLOT_BASE + APPDATA.tid] |
511 | ; compare current lock input with process PID |
510 | ; compare current lock input with process PID |
512 | cmp eax, [PID_lock_input] |
511 | cmp eax, [PID_lock_input] |
513 | jne @f |
512 | jne @f |
Line 514... | Line 513... | ||
514 | 513 | ||
Line 576... | Line 575... | ||
576 | popa |
575 | popa |
Line 577... | Line 576... | ||
577 | 576 | ||
578 | ; debuggee test |
577 | ; debuggee test |
579 | pushad |
578 | pushad |
580 | mov edi, esi |
579 | mov edi, esi |
581 | shl edi, BSF sizeof.TASKDATA |
580 | shl edi, BSF sizeof.APPDATA |
582 | mov eax, [SLOT_BASE+edi*8+APPDATA.debugger_slot] |
581 | mov eax, [SLOT_BASE + edi + APPDATA.debugger_slot] |
583 | test eax, eax |
582 | test eax, eax |
584 | jz .nodebug |
583 | jz .nodebug |
585 | movi ecx, 8 |
584 | movi ecx, 8 |
586 | push dword [TASK_TABLE+edi+TASKDATA.pid]; PID |
585 | push dword [SLOT_BASE + edi + APPDATA.tid]; PID |
587 | push 2 |
586 | push 2 |
588 | call debugger_notify |
587 | call debugger_notify |
589 | pop ecx |
588 | pop ecx |
590 | pop ecx |
589 | pop ecx |
Line 651... | Line 650... | ||
651 | .nothing_to_activate: |
650 | .nothing_to_activate: |
652 | popad |
651 | popad |
653 | .dont_activate: |
652 | .dont_activate: |
Line 654... | Line 653... | ||
654 | 653 | ||
655 | push esi ; remove hd1 & cd & flp reservation |
654 | push esi ; remove hd1 & cd & flp reservation |
656 | shl esi, BSF sizeof.TASKDATA |
655 | shl esi, BSF sizeof.APPDATA |
657 | mov esi, [esi+TASK_TABLE+TASKDATA.pid] |
656 | mov esi, [esi + SLOT_BASE + APPDATA.tid] |
658 | cmp [cd_status], esi |
657 | cmp [cd_status], esi |
659 | jnz @f |
658 | jnz @f |
660 | call free_cd_channel |
659 | call free_cd_channel |
661 | and [cd_status], 0 |
660 | and [cd_status], 0 |
Line 667... | Line 666... | ||
667 | and [bgrlock], 0 |
666 | and [bgrlock], 0 |
668 | @@: |
667 | @@: |
Line 669... | Line 668... | ||
669 | 668 | ||
670 | pusha ; remove all port reservations |
669 | pusha ; remove all port reservations |
671 | mov edx, esi |
670 | mov edx, esi |
672 | shl edx, BSF sizeof.TASKDATA |
- | |
673 | add edx, TASK_TABLE |
671 | shl edx, BSF sizeof.APPDATA |
Line 674... | Line 672... | ||
674 | mov edx, [edx+TASKDATA.pid] |
672 | mov edx, [edx + SLOT_BASE + APPDATA.tid] |
Line 675... | Line 673... | ||
675 | 673 | ||
Line 715... | Line 713... | ||
715 | mov edi, esi ; do not run this process slot |
713 | mov edi, esi ; do not run this process slot |
716 | shl edi, BSF sizeof.TASKDATA |
714 | shl edi, BSF sizeof.TASKDATA |
717 | mov [edi+TASK_TABLE + TASKDATA.state], TSTATE_FREE |
715 | mov [edi+TASK_TABLE + TASKDATA.state], TSTATE_FREE |
718 | ; debugger test - terminate all debuggees |
716 | ; debugger test - terminate all debuggees |
719 | mov eax, 2 |
717 | mov eax, 2 |
720 | mov ecx, SLOT_BASE+2*0x100+APPDATA.debugger_slot |
718 | mov ecx, SLOT_BASE+2*sizeof.APPDATA + APPDATA.debugger_slot |
721 | .xd0: |
719 | .xd0: |
722 | cmp eax, [thread_count] |
720 | cmp eax, [thread_count] |
723 | ja .xd1 |
721 | ja .xd1 |
724 | cmp dword [ecx], esi |
722 | cmp dword [ecx], esi |
725 | jnz @f |
723 | jnz @f |
Line 729... | Line 727... | ||
729 | mov ebx, 2 |
727 | mov ebx, 2 |
730 | call sys_system |
728 | call sys_system |
731 | popad |
729 | popad |
732 | @@: |
730 | @@: |
733 | inc eax |
731 | inc eax |
734 | add ecx, 0x100 |
732 | add ecx, sizeof.APPDATA |
735 | jmp .xd0 |
733 | jmp .xd0 |
736 | .xd1: |
734 | .xd1: |
737 | ;release slot |
735 | ;release slot |
Line 738... | Line 736... | ||
738 | 736 |