Subversion Repositories Kolibri OS

Rev

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

Rev 4456 Rev 4457
Line 413... Line 413...
413
 
413
 
414
align 4
414
align 4
415
terminate: ; terminate application
415
terminate: ; terminate application
Line 416... Line 416...
416
destroy_thread:
416
destroy_thread:
-
 
417
 
Line 417... Line 418...
417
 
418
        .slot     equ esp+4             ;locals
Line 418... Line 419...
418
           .slot equ esp   ;locals
419
        .process  equ esp               ;ptr to parent process
419
 
420
 
-
 
421
        push    esi                     ;save .slot
420
        push    esi        ;save .slot
422
 
421
 
423
        shl     esi, 8
422
        shl     esi, 8
424
        mov     edx, [SLOT_BASE+esi+APPDATA.process]
423
        cmp     [SLOT_BASE+esi+APPDATA.process], 0
425
        test    edx, edx
424
        jne     @F
426
        jnz     @F
425
        pop     esi
427
        pop     esi
-
 
428
        shl     esi, 5
426
        shl     esi, 5
429
        mov     [CURRENT_TASK+esi+TASKDATA.state], 9
427
        mov     [CURRENT_TASK+esi+TASKDATA.state], 9
430
        ret
428
        ret
431
@@:
Line 429... Line 432...
429
@@:
432
        push    edx                     ;save .process
Line 622... Line 625...
622
        mov     eax, [edi+APPDATA.io_map+4]
625
        mov     eax, [edi+APPDATA.io_map+4]
623
        cmp     eax, [SLOT_BASE+256+APPDATA.io_map+4]
626
        cmp     eax, [SLOT_BASE+256+APPDATA.io_map+4]
624
        je      @F
627
        je      @F
625
        call    free_page
628
        call    free_page
626
@@:
629
@@:
-
 
630
        lea     ebx, [edi+APPDATA.list]
-
 
631
        list_del ebx                    ;destroys edx, ecx
-
 
632
 
627
        mov     eax, 0x20202020
633
        mov     eax, 0x20202020
628
        stosd
634
        stosd
629
        stosd
635
        stosd
630
        stosd
636
        stosd
631
        mov     ecx, 244/4
637
        mov     ecx, 244/4
Line 738... Line 744...
738
        inc     eax
744
        inc     eax
739
        add     ecx, 0x100
745
        add     ecx, 0x100
740
        jmp     .xd0
746
        jmp     .xd0
741
.xd1:
747
.xd1:
742
;release slot
748
;release slot
-
 
749
 
-
 
750
        xchg bx, bx
-
 
751
 
743
        bts     [thr_slot_map], esi
752
        bts     [thr_slot_map], esi
Line -... Line 753...
-
 
753
 
-
 
754
        mov     ebx, [.process]
-
 
755
        add     ebx, PROC.thr_list
-
 
756
        cmp     ebx, [ebx+LHEAD.next]
-
 
757
        jne     @F
-
 
758
 
-
 
759
        DEBUGF 1,"%s",msg_process_destroy
-
 
760
 
744
 
761
@@:
Line 745... Line 762...
745
        sti     ; .. and life goes on
762
        sti     ; .. and life goes on
746
 
763
 
747
        mov     eax, [draw_limits.left]
764
        mov     eax, [draw_limits.left]
Line 754... Line 771...
754
        call    redrawscreen
771
        call    redrawscreen
Line 755... Line 772...
755
 
772
 
756
        call    unlock_application_table
773
        call    unlock_application_table
757
    ;mov   esi,process_terminated
774
    ;mov   esi,process_terminated
758
    ;call  sys_msg_board_str
775
    ;call  sys_msg_board_str
759
        add     esp, 4
776
        add     esp, 8
760
        ret
777
        ret
-
 
778
restore .slot
-
 
779
restore .process
-
 
780
 
Line 761... Line 781...
761
restore .slot
781
msg_process_destroy: db 'K: destroy process', 0x0d, 0x0a,0
762
 
782
 
763
 
783