Subversion Repositories Kolibri OS

Rev

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

Rev 6090 Rev 6263
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2015. 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: 6090 $
8
$Revision: 6263 $
Line 9... Line 9...
9
 
9
 
Line 73... Line 73...
73
         save_proc     dd ?
73
         save_proc     dd ?
74
         slot          dd ?
74
         slot          dd ?
75
         slot_base     dd ?
75
         slot_base     dd ?
76
         file_base     dd ?
76
         file_base     dd ?
77
         file_size     dd ?
77
         file_size     dd ?
78
         handle        dd ? ;temp. for default cursor handle for curr. thread
78
;         handle        dd ? ;temp. for default cursor handle for curr. thread
79
                      ;app header data
79
                      ;app header data
80
         hdr_cmdline   dd ? ;0x00
80
         hdr_cmdline   dd ? ;0x00
81
         hdr_path      dd ? ;0x04
81
         hdr_path      dd ? ;0x04
82
         hdr_eip       dd ? ;0x08
82
         hdr_eip       dd ? ;0x08
83
         hdr_esp       dd ? ;0x0C
83
         hdr_esp       dd ? ;0x0C
Line 85... Line 85...
85
         hdr_i_end     dd ? ;0x14
85
         hdr_i_end     dd ? ;0x14
86
       endl
86
       endl
Line 87... Line 87...
87
 
87
 
Line 88... Line 88...
88
        pushad
88
        pushad
89
 
89
 
90
        cmp     [SCR_MODE], word 0x13
90
;        cmp     [SCR_MODE], word 0x13
91
        jbe     @f
91
;        jbe     @f
92
        pushad
92
;        pushad
93
        stdcall set_cursor, [def_cursor_clock]
93
;        stdcall set_cursor, [def_cursor_clock]
94
        mov     [handle], eax
94
;        mov     [handle], eax
95
        mov     [redrawmouse_unconditional], 1
95
;        mov     [redrawmouse_unconditional], 1
96
        call    wakeup_osloop
96
;        call    wakeup_osloop
97
        popad
97
;        popad
Line 98... Line 98...
98
@@:
98
;@@:
Line 99... Line 99...
99
        mov     [flags], edx
99
        mov     [flags], edx
Line 254... Line 254...
254
        stdcall create_process, [hdr_mem], [file_base], [file_size]
254
        stdcall create_process, [hdr_mem], [file_base], [file_size]
255
        mov     esi, -30; no memory
255
        mov     esi, -30; no memory
256
        test    eax, eax
256
        test    eax, eax
257
        jz      .failed
257
        jz      .failed
Line -... Line 258...
-
 
258
 
-
 
259
        mov     ebx, [sys_proc+LHEAD.prev]
-
 
260
        __list_add eax, ebx, sys_proc
258
 
261
 
259
        mov     ebx, [hdr_mem]
262
        mov     ebx, [hdr_mem]
Line 260... Line 263...
260
        mov     [eax+PROC.mem_used], ebx
263
        mov     [eax+PROC.mem_used], ebx
261
 
264
 
Line 272... Line 275...
272
 
275
 
273
        not     edx
276
        not     edx
274
@@:
277
@@:
Line 275... Line -...
275
        mov     [ebx+APPDATA.tls_base], edx
-
 
276
 
-
 
277
if GREEDY_KERNEL
278
        mov     [ebx+APPDATA.tls_base], edx
278
else
279
 
279
        mov     ecx, [hdr_mem]
280
        mov     ecx, [hdr_mem]
280
        mov     edi, [file_size]
281
        mov     edi, [file_size]
281
        add     edi, 4095
282
        add     edi, 4095
Line 285... Line 286...
285
 
286
 
286
        xor     eax, eax
287
        xor     eax, eax
287
        cld
288
        cld
288
        rep stosb
289
        rep stosb
289
@@:
-
 
Line 290... Line 290...
290
end if
290
@@:
Line 291... Line 291...
291
 
291
 
292
; release only virtual space, not phisical memory
292
; release only virtual space, not phisical memory
Line 313... Line 313...
313
        stdcall kernel_free, [file_base]
313
        stdcall kernel_free, [file_base]
314
.err_file:
314
.err_file:
315
        call    unlock_application_table
315
        call    unlock_application_table
316
        mov     eax, esi
316
        mov     eax, esi
317
.final:
317
.final:
318
        cmp     [SCR_MODE], word 0x13
318
;        cmp     [SCR_MODE], word 0x13
319
        jbe     @f
319
;        jbe     @f
320
        pushad
320
;        pushad
321
        stdcall set_cursor, [handle]
321
;        stdcall set_cursor, [handle]
322
        mov     [redrawmouse_unconditional], 1
322
;        mov     [redrawmouse_unconditional], 1
323
        call    wakeup_osloop
323
;        call    wakeup_osloop
324
        popad
324
;        popad
325
@@:
325
;@@:
326
        ret
326
        ret
327
endp
327
endp
Line 328... Line 328...
328
 
328
 
329
align 4
329
align 4
Line 630... Line 630...
630
 
630
 
631
align 4
631
align 4
632
.internal:
632
.internal:
Line 633... Line 633...
633
        push    ecx
633
        push    ecx
634
 
634
 
Line 635... Line 635...
635
        mov     esi, [ecx+PROC.dlls_list_ptr]
635
        mov     esi, ecx
636
        call    destroy_all_hdlls
636
        list_del esi
Line 637... Line 637...
637
 
637
 
638
;        mov     ecx, pg_data.mutex
638
        mov     esi, [esi+PROC.dlls_list_ptr]
639
;        call    mutex_lock
639
        call    destroy_all_hdlls
640
 
640
 
Line 655... Line 655...
655
        dec     edi
655
        dec     edi
656
        jnz     .destroy
656
        jnz     .destroy
Line 657... Line 657...
657
 
657
 
658
        call    kernel_free     ;ecx still in stack
658
        call    kernel_free     ;ecx still in stack
659
        stdcall map_page, [tmp_task_ptab], 0, PG_UNMAP
-
 
660
 ;       mov     ecx, pg_data.mutex
-
 
661
 ;       call    mutex_unlock
-
 
662
 
659
        stdcall map_page, [tmp_task_ptab], 0, PG_UNMAP
663
.exit:
660
.exit:
Line 664... Line 661...
664
        ret
661
        ret
665
 
662