Rev 4429 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4429 | Rev 4456 | ||
---|---|---|---|
Line 411... | Line 411... | ||
411 | ; param |
411 | ; param |
412 | ; esi= slot |
412 | ; esi= slot |
Line 413... | Line 413... | ||
413 | 413 | ||
414 | align 4 |
414 | align 4 |
- | 415 | terminate: ; terminate application |
|
Line 415... | Line 416... | ||
415 | terminate: ; terminate application |
416 | destroy_thread: |
Line 416... | Line 417... | ||
416 | 417 | ||
Line 426... | Line 427... | ||
426 | mov [CURRENT_TASK+esi+TASKDATA.state], 9 |
427 | mov [CURRENT_TASK+esi+TASKDATA.state], 9 |
427 | ret |
428 | ret |
428 | @@: |
429 | @@: |
429 | lea edx, [SLOT_BASE+esi] |
430 | lea edx, [SLOT_BASE+esi] |
430 | call scheduler_remove_thread |
431 | call scheduler_remove_thread |
431 | ;mov esi,process_terminating |
- | |
432 | ;call sys_msg_board_str |
- | |
433 | call lock_application_table |
432 | call lock_application_table |
Line 434... | Line 433... | ||
434 | 433 | ||
435 | ; if the process is in V86 mode... |
434 | ; if the process is in V86 mode... |
436 | mov eax, [.slot] |
435 | mov eax, [.slot] |
Line 447... | Line 446... | ||
447 | mov ecx, [esi+12] |
446 | mov ecx, [esi+12] |
448 | mov [eax+SLOT_BASE+APPDATA.io_map], ecx |
447 | mov [eax+SLOT_BASE+APPDATA.io_map], ecx |
449 | mov ecx, [esi+8] |
448 | mov ecx, [esi+8] |
450 | mov [eax+SLOT_BASE+APPDATA.io_map+4], ecx |
449 | mov [eax+SLOT_BASE+APPDATA.io_map+4], ecx |
451 | .nov86: |
450 | .nov86: |
452 | - | ||
- | 451 | ;destroy per-thread kerlen objects |
|
453 | mov esi, [.slot] |
452 | mov esi, [.slot] |
454 | shl esi, 8 |
453 | shl esi, 8 |
455 | add esi, SLOT_BASE+APP_OBJ_OFFSET |
454 | add esi, SLOT_BASE+APP_OBJ_OFFSET |
456 | @@: |
455 | @@: |
457 | mov eax, [esi+APPOBJ.fd] |
456 | mov eax, [esi+APPOBJ.fd] |
Line 465... | Line 464... | ||
465 | call [eax+APPOBJ.destroy] |
464 | call [eax+APPOBJ.destroy] |
466 | DEBUGF 1,"%s",msg_obj_destroy |
465 | DEBUGF 1,"%s",msg_obj_destroy |
467 | pop esi |
466 | pop esi |
468 | jmp @B |
467 | jmp @B |
469 | @@: |
468 | @@: |
470 | - | ||
471 | mov eax, [.slot] |
- | |
472 | shl eax, 8 |
- | |
473 | ; stdcall destroy_app_space, [SLOT_BASE+eax+APPDATA.process], [SLOT_BASE+eax+APPDATA.dlls_list_ptr] |
- | |
474 | - | ||
475 | mov esi, [.slot] |
469 | mov esi, [.slot] |
476 | cmp [fpu_owner], esi ; if user fpu last -> fpu user = 2 |
470 | cmp [fpu_owner], esi ; if user fpu last -> fpu user = 2 |
477 | jne @F |
471 | jne @F |
Line 478... | Line 472... | ||
478 | 472 | ||
Line 743... | Line 737... | ||
743 | @@: |
737 | @@: |
744 | inc eax |
738 | inc eax |
745 | add ecx, 0x100 |
739 | add ecx, 0x100 |
746 | jmp .xd0 |
740 | jmp .xd0 |
747 | .xd1: |
741 | .xd1: |
748 | ; call systest |
742 | ;release slot |
- | 743 | bts [thr_slot_map], esi |
|
- | 744 | ||
749 | sti ; .. and life goes on |
745 | sti ; .. and life goes on |
Line 750... | Line 746... | ||
750 | 746 | ||
751 | mov eax, [draw_limits.left] |
747 | mov eax, [draw_limits.left] |
752 | mov ebx, [draw_limits.top] |
748 | mov ebx, [draw_limits.top] |
Line 762... | Line 758... | ||
762 | ;call sys_msg_board_str |
758 | ;call sys_msg_board_str |
763 | add esp, 4 |
759 | add esp, 4 |
764 | ret |
760 | ret |
765 | restore .slot |
761 | restore .slot |
Line 766... | Line -... | ||
766 | - | ||
767 | ;build_scheduler: |
- | |
768 | ; mov esi, boot_sched_1 |
- | |
769 | ; call boot_log |
- | |
770 | ; call build_process_gdt_tss_pointer |
- | |
771 | - | ||
772 | ; mov esi,boot_sched_2 |
- | |
773 | ; call boot_log |
- | |
Line 774... | Line 762... | ||
774 | ; ret |
762 | |
775 | 763 | ||
776 | ; Three following procedures are used to guarantee that |
764 | ; Three following procedures are used to guarantee that |
777 | ; some part of kernel code will not be terminated from outside |
765 | ; some part of kernel code will not be terminated from outside |