Subversion Repositories Kolibri OS

Rev

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

Rev 3344 Rev 3534
Line 9... Line 9...
9
;;  Distributed under GPL. See file COPYING for details.        ;;
9
;;  Distributed under GPL. See file COPYING for details.        ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
11
;;                                                              ;;
11
;;                                                              ;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
$Revision: 3344 $
14
$Revision: 3534 $
15
 
15
 
16
align 4 ;3A08
16
align 4 ;3A08
17
build_interrupt_table:
17
build_interrupt_table:
Line 157... Line 157...
157
        sti
157
        sti
158
; not debuggee => say error and terminate
158
; not debuggee => say error and terminate
159
        call    show_error_parameters ;; only ONE using, inline ???
159
        call    show_error_parameters ;; only ONE using, inline ???
160
       ;mov     edx, [TASK_BASE]
160
       ;mov     edx, [TASK_BASE]
161
        mov     [edx + TASKDATA.state], byte 4 ; terminate
161
        mov     [edx + TASKDATA.state], byte 4 ; terminate
-
 
162
        call    wakeup_osloop
162
        jmp     change_task     ; stack - here it does not matter at all, SEE: core/shed.inc
163
        jmp     change_task     ; stack - here it does not matter at all, SEE: core/shed.inc
163
.debug:
164
.debug:
164
; we are debugged process, notify debugger and suspend ourself
165
; we are debugged process, notify debugger and suspend ourself
165
; eax=debugger PID
166
; eax=debugger PID
166
        mov     ecx, 1          ; debug_message code=other_exception
167
        mov     ecx, 1          ; debug_message code=other_exception
Line 259... Line 260...
259
  restore  reg_esi
260
  restore  reg_esi
260
  restore  reg_edi
261
  restore  reg_edi
Line 261... Line 262...
261
 
262
 
262
 
263
 
263
align 4
264
align 4
-
 
265
lock_application_table:
-
 
266
        push    eax ecx edx
Line 264... Line 267...
264
set_application_table_status:
267
        mov     ecx, application_table_mutex
265
        push    eax
268
        call    mutex_lock
266
 
269
 
267
        mov     eax, [CURRENT_TASK]
270
        mov     eax, [CURRENT_TASK]
Line 268... Line 271...
268
        shl     eax, 5
271
        shl     eax, 5
Line 269... Line 272...
269
        add     eax, CURRENT_TASK+TASKDATA.pid
272
        add     eax, CURRENT_TASK+TASKDATA.pid
Line 270... Line 273...
270
        mov     eax, [eax]
273
        mov     eax, [eax]
Line 271... Line 274...
271
 
274
 
272
        mov     [application_table_status], eax
275
        mov     [application_table_owner], eax
273
 
276
 
Line 274... Line 277...
274
        pop     eax
277
        pop     edx ecx eax
275
 
-
 
276
        ret
278
 
277
 
279
        ret
Line 278... Line -...
278
align 4
-
 
279
clear_application_table_status:
-
 
280
        push    eax
280
 
281
 
-
 
282
        mov     eax, [CURRENT_TASK]
-
 
283
        shl     eax, 5
-
 
284
        add     eax, CURRENT_TASK+TASKDATA.pid
-
 
Line 285... Line 281...
285
        mov     eax, [eax]
281
align 4
Line 286... Line 282...
286
 
282
unlock_application_table:
287
        cmp     eax, [application_table_status]
283
        push    eax ecx edx
Line 336... Line 332...
336
        pop     esi
332
        pop     esi
337
        shl     esi, 5
333
        shl     esi, 5
338
        mov     [CURRENT_TASK+esi+TASKDATA.state], 9
334
        mov     [CURRENT_TASK+esi+TASKDATA.state], 9
339
        ret
335
        ret
340
@@:
336
@@:
-
 
337
        lea     edx, [SLOT_BASE+esi]
-
 
338
        call    scheduler_remove_thread
341
           ;mov    esi,process_terminating
339
           ;mov    esi,process_terminating
342
           ;call   sys_msg_board_str
340
           ;call   sys_msg_board_str
343
@@:
-
 
344
        cli
-
 
345
        cmp     [application_table_status], 0
-
 
346
        je      term9
-
 
347
        sti
-
 
348
        call    change_task
-
 
349
        jmp     @b
-
 
350
term9:
-
 
351
        call    set_application_table_status
341
        call    lock_application_table
Line 352... Line 342...
352
 
342
 
353
; if the process is in V86 mode...
343
; if the process is in V86 mode...
354
        mov     eax, [.slot]
344
        mov     eax, [.slot]
355
        shl     eax, 8
345
        shl     eax, 8
Line 389... Line 379...
389
        mov     eax, [.slot]
379
        mov     eax, [.slot]
390
        shl     eax, 8
380
        shl     eax, 8
391
        stdcall destroy_app_space, [SLOT_BASE+eax+APPDATA.dir_table], [SLOT_BASE+eax+APPDATA.dlls_list_ptr]
381
        stdcall destroy_app_space, [SLOT_BASE+eax+APPDATA.dir_table], [SLOT_BASE+eax+APPDATA.dlls_list_ptr]
Line 392... Line 382...
392
 
382
 
393
        mov     esi, [.slot]
383
        mov     esi, [.slot]
394
        cmp     [fpu_owner], esi ; if user fpu last -> fpu user = 1
384
        cmp     [fpu_owner], esi ; if user fpu last -> fpu user = 2
Line 395... Line 385...
395
        jne     @F
385
        jne     @F
396
 
386
 
397
        mov     [fpu_owner], 1
387
        mov     [fpu_owner], 2
398
        mov     eax, [256+SLOT_BASE+APPDATA.fpu_state]
388
        mov     eax, [256*2+SLOT_BASE+APPDATA.fpu_state]
399
        clts
389
        clts
400
        bt      [cpu_caps], CAPS_SSE
390
        bt      [cpu_caps], CAPS_SSE
401
        jnc     .no_SSE
391
        jnc     .no_SSE
Line 686... Line 676...
686
        call    redrawscreen
676
        call    redrawscreen
Line 687... Line 677...
687
 
677
 
688
        mov     [MOUSE_BACKGROUND], byte 0; no mouse background
678
        mov     [MOUSE_BACKGROUND], byte 0; no mouse background
Line 689... Line 679...
689
        mov     [DONT_DRAW_MOUSE], byte 0; draw mouse
679
        mov     [DONT_DRAW_MOUSE], byte 0; draw mouse
690
 
680
 
691
        and     [application_table_status], 0
681
        call    unlock_application_table
692
    ;mov   esi,process_terminated
682
    ;mov   esi,process_terminated
693
    ;call  sys_msg_board_str
683
    ;call  sys_msg_board_str
694
        add     esp, 4
684
        add     esp, 4