Rev 6015 | Rev 6244 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6015 | Rev 6122 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; |
2 | ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. |
3 | ;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. |
4 | ;; PROGRAMMING: |
4 | ;; PROGRAMMING: |
5 | ;; Ivan Poddubny |
5 | ;; Ivan Poddubny |
6 | ;; Marat Zakiyanov (Mario79) |
6 | ;; Marat Zakiyanov (Mario79) |
7 | ;; VaStaNi |
7 | ;; VaStaNi |
8 | ;; Trans |
8 | ;; Trans |
Line 69... | Line 69... | ||
69 | format binary as "mnt" |
69 | format binary as "mnt" |
Line 70... | Line 70... | ||
70 | 70 | ||
71 | include 'macros.inc' |
71 | include 'macros.inc' |
Line 72... | Line 72... | ||
72 | include 'struct.inc' |
72 | include 'struct.inc' |
Line 73... | Line 73... | ||
73 | 73 | ||
74 | $Revision: 6015 $ |
74 | $Revision: 6122 $ |
Line 2175... | Line 2175... | ||
2175 | 2175 | ||
2176 | stdcall user_free, eax |
2176 | stdcall user_free, eax |
Line 2177... | Line 2177... | ||
2177 | @@: |
2177 | @@: |
2178 | 2178 | ||
2179 | mov eax, [TASK_BASE] |
2179 | mov eax, [TASK_BASE] |
Line 2180... | Line 2180... | ||
2180 | mov [eax+TASKDATA.state], 3; terminate this program |
2180 | mov [eax+TASKDATA.state], TSTATE_ZOMBIE |
2181 | call wakeup_osloop |
2181 | call wakeup_osloop |
2182 | 2182 | ||
Line 3744... | Line 3744... | ||
3744 | jecxz no_mark_system_shutdown |
3744 | jecxz no_mark_system_shutdown |
3745 | ;-------------------------------------- |
3745 | ;-------------------------------------- |
3746 | align 4 |
3746 | align 4 |
3747 | markz: |
3747 | markz: |
3748 | push ecx edx |
3748 | push ecx edx |
3749 | cmp [edx+TASKDATA.state], 9 |
3749 | cmp [edx+TASKDATA.state], TSTATE_FREE |
3750 | jz .nokill |
3750 | jz .nokill |
3751 | lea edx, [(edx-(CURRENT_TASK and 1FFFFFFFh))*8+SLOT_BASE] |
3751 | lea edx, [(edx-(CURRENT_TASK and 1FFFFFFFh))*8+SLOT_BASE] |
3752 | cmp [edx+APPDATA.process], sys_proc |
3752 | cmp [edx+APPDATA.process], sys_proc |
3753 | jz .nokill |
3753 | jz .nokill |
3754 | call request_terminate |
3754 | call request_terminate |
Line 3758... | Line 3758... | ||
3758 | xor eax, eax |
3758 | xor eax, eax |
3759 | .common: |
3759 | .common: |
3760 | pop edx ecx |
3760 | pop edx ecx |
3761 | test eax, eax |
3761 | test eax, eax |
3762 | jz @f |
3762 | jz @f |
3763 | mov [edx+TASKDATA.state], byte 3 |
3763 | mov [edx+TASKDATA.state], TSTATE_ZOMBIE |
3764 | @@: |
3764 | @@: |
3765 | add edx, 0x20 |
3765 | add edx, 0x20 |
3766 | loop markz |
3766 | loop markz |
3767 | call wakeup_osloop |
3767 | call wakeup_osloop |
3768 | ;-------------------------------------- |
3768 | ;-------------------------------------- |