Subversion Repositories Kolibri OS

Rev

Rev 8866 | Rev 8874 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8866 Rev 8869
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: 8866 $
8
$Revision: 8869 $
9
 
9
 
10
align 4 ;3A08
10
align 4 ;3A08
11
build_interrupt_table:
11
build_interrupt_table:
Line 340... Line 340...
340
lock_application_table:
340
lock_application_table:
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_TASK]
345
        mov     eax, [current_slot_idx]
346
        shl     eax, 5
346
        shl     eax, BSF sizeof.TASKDATA
347
        add     eax, CURRENT_TASK+TASKDATA.pid
347
        add     eax, TASK_TABLE+TASKDATA.pid
Line 348... Line 348...
348
        mov     eax, [eax]
348
        mov     eax, [eax]
Line 349... Line 349...
349
 
349
 
Line 416... Line 416...
416
        shl     esi, 8
416
        shl     esi, 8
417
        mov     edx, [SLOT_BASE+esi+APPDATA.process]
417
        mov     edx, [SLOT_BASE+esi+APPDATA.process]
418
        test    edx, edx
418
        test    edx, edx
419
        jnz     @F
419
        jnz     @F
420
        pop     esi
420
        pop     esi
421
        shl     esi, 5
421
        shl     esi, BSF sizeof.TASKDATA
422
        mov     [CURRENT_TASK+esi+TASKDATA.state], 9
422
        mov     [TASK_TABLE+esi+TASKDATA.state], 9
423
        ret
423
        ret
424
@@:
424
@@:
425
        push    edx                     ;save .process
425
        push    edx                     ;save .process
426
        lea     edx, [SLOT_BASE+esi]
426
        lea     edx, [SLOT_BASE+esi]
427
        call    scheduler_remove_thread
427
        call    scheduler_remove_thread
Line 504... Line 504...
504
        add     eax, 16
504
        add     eax, 16
505
        cmp     eax, hotkey_list+256*16
505
        cmp     eax, hotkey_list+256*16
506
        jb      .loop
506
        jb      .loop
507
; get process PID
507
; get process PID
508
        mov     eax, esi
508
        mov     eax, esi
509
        shl     eax, 5
509
        shl     eax, BSF sizeof.TASKDATA
510
        mov     eax, [eax+CURRENT_TASK+TASKDATA.pid]
510
        mov     eax, [eax+TASK_TABLE+TASKDATA.pid]
511
; compare current lock input with process PID
511
; compare current lock input with process PID
512
        cmp     eax, [PID_lock_input]
512
        cmp     eax, [PID_lock_input]
513
        jne     @f
513
        jne     @f
Line 514... Line 514...
514
 
514
 
Line 576... Line 576...
576
        popa
576
        popa
Line 577... Line 577...
577
 
577
 
578
; debuggee test
578
; debuggee test
579
        pushad
579
        pushad
580
        mov     edi, esi
580
        mov     edi, esi
581
        shl     edi, 5
581
        shl     edi, BSF sizeof.TASKDATA
582
        mov     eax, [SLOT_BASE+edi*8+APPDATA.debugger_slot]
582
        mov     eax, [SLOT_BASE+edi*8+APPDATA.debugger_slot]
583
        test    eax, eax
583
        test    eax, eax
584
        jz      .nodebug
584
        jz      .nodebug
585
        movi    ecx, 8
585
        movi    ecx, 8
586
        push    dword [CURRENT_TASK+edi+TASKDATA.pid]; PID
586
        push    dword [TASK_TABLE+edi+TASKDATA.pid]; PID
587
        push    2
587
        push    2
588
        call    debugger_notify
588
        call    debugger_notify
589
        pop     ecx
589
        pop     ecx
590
        pop     ecx
590
        pop     ecx
Line 636... Line 636...
636
        dec     eax
636
        dec     eax
637
        cmp     eax, 1
637
        cmp     eax, 1
638
        jbe     .nothing_to_activate
638
        jbe     .nothing_to_activate
639
        lea     esi, [WIN_POS+eax*2]
639
        lea     esi, [WIN_POS+eax*2]
640
        movzx   edi, word [esi]              ; edi = process
640
        movzx   edi, word [esi]              ; edi = process
641
        shl     edi, 5
641
        shl     edi, BSF sizeof.TASKDATA
642
        cmp     [CURRENT_TASK + edi + TASKDATA.state], byte 9 ; skip dead slots
642
        cmp     [TASK_TABLE + edi + TASKDATA.state], byte 9 ; skip dead slots
643
        je      .check_next_window
643
        je      .check_next_window
644
        add     edi, window_data
644
        add     edi, window_data
645
; \begin{diamond}[19.09.2006]
645
; \begin{diamond}[19.09.2006]
646
; skip minimized windows
646
; skip minimized windows
647
        test    [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
647
        test    [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
Line 651... Line 651...
651
 .nothing_to_activate:
651
 .nothing_to_activate:
652
        popad
652
        popad
653
 .dont_activate:
653
 .dont_activate:
Line 654... Line 654...
654
 
654
 
655
        push    esi     ; remove hd1 & cd & flp reservation
655
        push    esi     ; remove hd1 & cd & flp reservation
656
        shl     esi, 5
656
        shl     esi, BSF sizeof.TASKDATA
657
        mov     esi, [esi+CURRENT_TASK+TASKDATA.pid]
657
        mov     esi, [esi+TASK_TABLE+TASKDATA.pid]
658
        cmp     [cd_status], esi
658
        cmp     [cd_status], esi
659
        jnz     @f
659
        jnz     @f
660
        call    free_cd_channel
660
        call    free_cd_channel
661
        and     [cd_status], 0
661
        and     [cd_status], 0
Line 667... Line 667...
667
        and     [bgrlock], 0
667
        and     [bgrlock], 0
668
@@:
668
@@:
Line 669... Line 669...
669
 
669
 
670
        pusha                 ; remove all port reservations
670
        pusha                 ; remove all port reservations
671
        mov     edx, esi
671
        mov     edx, esi
672
        shl     edx, 5
672
        shl     edx, BSF sizeof.TASKDATA
673
        add     edx, CURRENT_TASK
673
        add     edx, TASK_TABLE
Line 674... Line 674...
674
        mov     edx, [edx+TASKDATA.pid]
674
        mov     edx, [edx+TASKDATA.pid]
Line 675... Line 675...
675
 
675
 
Line 711... Line 711...
711
 
711
 
Line 712... Line 712...
712
  rmpr9:
712
  rmpr9:
713
 
713
 
714
        popa
714
        popa
715
        mov     edi, esi ; do not run this process slot
715
        mov     edi, esi ; do not run this process slot
716
        shl     edi, 5
716
        shl     edi, BSF sizeof.TASKDATA
717
        mov     [edi+CURRENT_TASK + TASKDATA.state], byte 9
717
        mov     [edi+TASK_TABLE + TASKDATA.state], byte 9
718
; debugger test - terminate all debuggees
718
; debugger test - terminate all debuggees
719
        mov     eax, 2
719
        mov     eax, 2
720
        mov     ecx, SLOT_BASE+2*0x100+APPDATA.debugger_slot
720
        mov     ecx, SLOT_BASE+2*0x100+APPDATA.debugger_slot