Rev 8249 | Rev 8329 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8249 | Rev 8270 | ||
---|---|---|---|
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: 8249 $ |
74 | $Revision: 8270 $ |
Line 2195... | Line 2195... | ||
2195 | uglobal |
2195 | uglobal |
2196 | shutdown_processes: |
2196 | shutdown_processes: |
2197 | dd 0x0 |
2197 | dd 0x0 |
2198 | endg |
2198 | endg |
2199 | ;------------------------------------------------------------------------------ |
2199 | ;------------------------------------------------------------------------------ |
- | 2200 | ; in: eax -- APPDATA ptr |
|
- | 2201 | ; out: Z/z -- is/not kernel thread |
|
- | 2202 | is_kernel_thread: |
|
- | 2203 | mov eax, [eax+APPDATA.process] |
|
- | 2204 | cmp eax, [SLOT_BASE+2*sizeof.APPDATA+APPDATA.process] ; OS |
|
- | 2205 | ret |
|
- | 2206 | ;------------------------------------------------------------------------------ |
|
2200 | sysfn_terminate: ; 18.2 = TERMINATE |
2207 | sysfn_terminate: ; 18.2 = TERMINATE |
2201 | push ecx |
2208 | push ecx |
2202 | cmp ecx, 2 |
2209 | cmp ecx, 2 |
2203 | jb noprocessterminate |
2210 | jb noprocessterminate |
2204 | mov edx, [TASK_COUNT] |
2211 | mov edx, [TASK_COUNT] |
2205 | cmp ecx, edx |
2212 | cmp ecx, edx |
2206 | ja noprocessterminate |
2213 | ja noprocessterminate |
2207 | mov eax, [TASK_COUNT] |
2214 | mov eax, [TASK_COUNT] |
2208 | shl ecx, 5 |
2215 | shl ecx, BSF sizeof.TASKDATA |
2209 | mov edx, [ecx+CURRENT_TASK+TASKDATA.pid] |
2216 | mov edx, [ecx+CURRENT_TASK+TASKDATA.pid] |
2210 | add ecx, CURRENT_TASK+TASKDATA.state |
2217 | add ecx, CURRENT_TASK+TASKDATA.state |
2211 | cmp byte [ecx], 9 |
2218 | cmp byte [ecx], TSTATE_FREE |
- | 2219 | jz noprocessterminate |
|
- | 2220 | push eax |
|
- | 2221 | lea eax, [(ecx-(CURRENT_TASK and 1FFFFFFFh)-TASKDATA.state)*8+SLOT_BASE] |
|
- | 2222 | call is_kernel_thread |
|
- | 2223 | pop eax |
|
2212 | jz noprocessterminate |
2224 | jz noprocessterminate |
2213 | push ecx edx |
2225 | push ecx edx |
2214 | lea edx, [(ecx-(CURRENT_TASK and 1FFFFFFFh)-TASKDATA.state)*8+SLOT_BASE] |
2226 | lea edx, [(ecx-(CURRENT_TASK and 1FFFFFFFh)-TASKDATA.state)*8+SLOT_BASE] |
2215 | call request_terminate |
2227 | call request_terminate |
2216 | pop edx ecx |
2228 | pop edx ecx |