Subversion Repositories Kolibri OS

Rev

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

Rev 9614 Rev 9692
Line 75... Line 75...
75
format binary as "mnt"
75
format binary as "mnt"
Line 76... Line 76...
76
 
76
 
77
include 'macros.inc'
77
include 'macros.inc'
Line 78... Line 78...
78
include 'struct.inc'
78
include 'struct.inc'
Line 79... Line 79...
79
 
79
 
80
$Revision: 9614 $
80
$Revision: 9692 $
Line 1180... Line 1180...
1180
        lea     ebx, [edx+APPDATA.list]
1180
        lea     ebx, [edx+APPDATA.list]
1181
        lea     ecx, [sys_proc+PROC.thr_list]
1181
        lea     ecx, [sys_proc+PROC.thr_list]
1182
        list_add_tail ebx, ecx
1182
        list_add_tail ebx, ecx
Line 1183... Line 1183...
1183
 
1183
 
1184
        mov     [edx+APPDATA.wnd_number], dh
-
 
1185
        mov     byte [edx+APPDATA.tid], dh    ;?
-
 
1186
        mov     eax, edx
-
 
1187
        shr     eax, 3
-
 
1188
        add     eax, TASK_TABLE - (SLOT_BASE shr 3)
1184
        mov     [edx+APPDATA.wnd_number], dh
Line 1189... Line 1185...
1189
        mov     byte [eax+TASKDATA.pid], dh
1185
        mov     byte [edx+APPDATA.tid], dh
1190
 
1186
 
Line 1191... Line 1187...
1191
        ret
1187
        ret
Line 1921... Line 1917...
1921
;--------------------------------------
1917
;--------------------------------------
1922
; kill all sockets this process owns
1918
; kill all sockets this process owns
1923
        pusha
1919
        pusha
1924
        mov     edx, [current_slot]
1920
        mov     edx, [current_slot]
1925
        mov     edx, [edx+APPDATA.tid]
1921
        mov     edx, [edx+APPDATA.tid]
1926
        mov     edx, [TASK_BASE]           ; delete
-
 
1927
        mov     edx, [edx+TASKDATA.pid]    ;
-
 
1928
        call    socket_process_end
1922
        call    socket_process_end
1929
        popa
1923
        popa
1930
;--------------------------------------
1924
;--------------------------------------
1931
        mov     ecx, [current_slot]
1925
        mov     ecx, [current_slot]
1932
        mov     eax, [ecx+APPDATA.tls_base]
1926
        mov     eax, [ecx+APPDATA.tls_base]
Line 2048... Line 2042...
2048
        mov     edx, [thread_count]
2042
        mov     edx, [thread_count]
2049
        cmp     ecx, edx
2043
        cmp     ecx, edx
2050
        ja      noprocessterminate
2044
        ja      noprocessterminate
2051
        mov     eax, [thread_count]
2045
        mov     eax, [thread_count]
2052
        shl     ecx, BSF sizeof.TASKDATA
2046
        shl     ecx, BSF sizeof.TASKDATA
2053
        mov     edx, [ecx+TASK_TABLE+TASKDATA.pid]
2047
        mov     edx, [ecx*8 + SLOT_BASE + APPDATA.tid]
2054
        add     ecx, TASK_TABLE+TASKDATA.state
2048
        add     ecx, TASK_TABLE+TASKDATA.state
2055
        cmp     byte [ecx], TSTATE_FREE
2049
        cmp     byte [ecx], TSTATE_FREE
2056
        jz      noprocessterminate
2050
        jz      noprocessterminate
2057
        push    eax
2051
        push    eax
2058
        lea     eax, [(ecx-(TASK_TABLE and 1FFFFFFFh)-TASKDATA.state)*8+SLOT_BASE]
2052
        lea     eax, [(ecx-(TASK_TABLE and 1FFFFFFFh)-TASKDATA.state)*8+SLOT_BASE]
Line 2657... Line 2651...
2657
        lea     eax, [edx-1]
2651
        lea     eax, [edx-1]
2658
        stosd
2652
        stosd
Line 2659... Line 2653...
2659
 
2653
 
2660
; +30: PID/TID
2654
; +30: PID/TID
2661
        mov     eax, [ecx*8 + SLOT_BASE + APPDATA.tid]
-
 
2662
        mov     eax, [ecx+TASK_TABLE+TASKDATA.pid]
2655
        mov     eax, [ecx*8 + SLOT_BASE + APPDATA.tid]
Line 2663... Line 2656...
2663
        stosd
2656
        stosd
2664
 
2657
 
2665
    ; window position and size
2658
    ; window position and size
Line 3614... Line 3607...
3614
        mov     eax, [RESERVED_PORTS]
3607
        mov     eax, [RESERVED_PORTS]
3615
        add     eax, 1
3608
        add     eax, 1
3616
        mov     [RESERVED_PORTS], eax
3609
        mov     [RESERVED_PORTS], eax
3617
        shl     eax, 4
3610
        shl     eax, 4
3618
        add     eax, RESERVED_PORTS
3611
        add     eax, RESERVED_PORTS
3619
        ;mov     ebx, [current_slot]
3612
        mov     ebx, [current_slot]
3620
        ;mov     ebx, [ebx+APPDATA.tid]
3613
        mov     ebx, [ebx+APPDATA.tid]
3621
        mov     ebx, [TASK_BASE]
-
 
3622
        mov     ebx, [ebx+TASKDATA.pid]
-
 
3623
        mov     [eax], ebx
3614
        mov     [eax], ebx
3624
        mov     [eax+4], ecx
3615
        mov     [eax+4], ecx
3625
        mov     [eax+8], edx
3616
        mov     [eax+8], edx
Line 3626... Line 3617...
3626
 
3617
 
Line 3631... Line 3622...
3631
 
3622
 
3632
;     pushad
3623
;     pushad
3633
        mov     eax, [RESERVED_PORTS]; no reserved areas ?
3624
        mov     eax, [RESERVED_PORTS]; no reserved areas ?
3634
        test    eax, eax
3625
        test    eax, eax
3635
        jz      frpal2
3626
        jz      frpal2
3636
        ;mov     ebx, [current_slot]
3627
        mov     ebx, [current_slot]
3637
        ;mov     ebx, [ebx+APPDATA.tid]
-
 
3638
        mov     ebx, [TASK_BASE]
-
 
3639
        mov     ebx, [ebx+TASKDATA.pid]
3628
        mov     ebx, [ebx+APPDATA.tid]
3640
   frpal3:
3629
   frpal3:
3641
        mov     edi, eax
3630
        mov     edi, eax
3642
        shl     edi, 4
3631
        shl     edi, 4
3643
        add     edi, RESERVED_PORTS
3632
        add     edi, RESERVED_PORTS
Line 4418... Line 4407...
4418
        mov     eax, [PID_lock_input]
4407
        mov     eax, [PID_lock_input]
4419
        test    eax, eax
4408
        test    eax, eax
4420
        jnz     @f
4409
        jnz     @f
4421
; get current PID
4410
; get current PID
4422
        mov     eax, [current_slot_idx]
4411
        mov     eax, [current_slot_idx]
4423
        shl     eax, 5
4412
        shl     eax, BSF sizeof.APPDATA
4424
        mov     eax, [eax+TASK_TABLE+TASKDATA.pid]
-
 
4425
        ;shl     eax, 8
-
 
4426
        ;mov     eax, [eax+SLOT_BASE+APPDATA.tid]
4413
        mov     eax, [eax+SLOT_BASE+APPDATA.tid]
4427
; set current PID for lock input
4414
; set current PID for lock input
4428
        mov     [PID_lock_input], eax
4415
        mov     [PID_lock_input], eax
4429
@@:
4416
@@:
4430
        popfd
4417
        popfd
4431
        ret
4418
        ret
Line 4435... Line 4422...
4435
        mov     eax, [PID_lock_input]
4422
        mov     eax, [PID_lock_input]
4436
        test    eax, eax
4423
        test    eax, eax
4437
        jz      @f
4424
        jz      @f
4438
; get current PID
4425
; get current PID
4439
        mov     ebx, [current_slot_idx]
4426
        mov     ebx, [current_slot_idx]
4440
        shl     ebx, 5
4427
        shl     ebx, BSF sizeof.APPDATA
4441
        mov     ebx, [ebx+TASK_TABLE+TASKDATA.pid]
-
 
4442
        ;shl     ebx, 8
-
 
4443
        ;mov     ebx, [ebx+SLOT_BASE+APPDATA.tid]
4428
        mov     ebx, [ebx+SLOT_BASE+APPDATA.tid]
4444
; compare current lock input with current PID
4429
; compare current lock input with current PID
4445
        cmp     ebx, eax
4430
        cmp     ebx, eax
4446
        jne     @f
4431
        jne     @f
Line 4447... Line 4432...
4447
 
4432