Subversion Repositories Kolibri OS

Rev

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

Rev 8869 Rev 8874
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: 8869 $
8
$Revision: 8874 $
9
 
9
 
10
align 4 ;3A08
10
align 4 ;3A08
11
build_interrupt_table:
11
build_interrupt_table:
Line 150... Line 150...
150
        test    eax, eax
150
        test    eax, eax
151
        jnz     .debug
151
        jnz     .debug
152
; not debuggee => say error and terminate
152
; not debuggee => say error and terminate
153
        call    show_error_parameters
153
        call    show_error_parameters
154
        sti
154
        sti
155
        mov     [edx + TASKDATA.state], byte 4 ; terminate
155
        mov     [edx + TASKDATA.state], TSTATE_TERMINATING ; terminate
156
        call    wakeup_osloop
156
        call    wakeup_osloop
157
        call    change_task
157
        call    change_task
158
; If we're here, then the main OS thread has crashed before initializing IDLE thread.
158
; If we're here, then the main OS thread has crashed before initializing IDLE thread.
159
; Or they both have crashed. Anyway, things are hopelessly broken.
159
; Or they both have crashed. Anyway, things are hopelessly broken.
160
        hlt
160
        hlt
Line 185... Line 185...
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]
190
        mov     byte [edx+TASKDATA.state], 1 ; suspended
190
        mov     [edx+TASKDATA.state], TSTATE_RUN_SUSPENDED ; suspended
191
        call    change_task     ; SEE: core/shed.inc
191
        call    change_task     ; SEE: core/shed.inc
192
        restore_ring3_context
192
        restore_ring3_context
193
        iretd
193
        iretd
Line 194... Line 194...
194
 
194
 
Line 417... Line 417...
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, BSF sizeof.TASKDATA
421
        shl     esi, BSF sizeof.TASKDATA
422
        mov     [TASK_TABLE+esi+TASKDATA.state], 9
422
        mov     [TASK_TABLE+esi+TASKDATA.state], TSTATE_FREE
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 637... Line 637...
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, BSF sizeof.TASKDATA
641
        shl     edi, BSF sizeof.TASKDATA
642
        cmp     [TASK_TABLE + edi + TASKDATA.state], byte 9 ; skip dead slots
642
        cmp     [TASK_TABLE + edi + TASKDATA.state], TSTATE_FREE ; skip free 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 712... Line 712...
712
  rmpr9:
712
  rmpr9:
Line 713... Line 713...
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, BSF sizeof.TASKDATA
716
        shl     edi, BSF sizeof.TASKDATA
717
        mov     [edi+TASK_TABLE + TASKDATA.state], byte 9
717
        mov     [edi+TASK_TABLE + TASKDATA.state], TSTATE_FREE
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
721
.xd0:
721
.xd0: