Rev 392 | Rev 425 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 392 | Rev 412 | ||
---|---|---|---|
Line 224... | Line 224... | ||
224 | stdcall set_app_params ,[slot],eax,ebx,ecx,[flags] |
224 | stdcall set_app_params ,[slot],eax,ebx,ecx,[flags] |
Line 225... | Line 225... | ||
225 | 225 | ||
226 | mov eax, [save_cr3] |
226 | mov eax, [save_cr3] |
Line 227... | Line -... | ||
227 | call set_cr3 |
- | |
228 | 227 | call set_cr3 |
|
229 | ; popfd |
228 | |
230 | xor ebx, ebx |
229 | xor ebx, ebx |
231 | mov [application_table_status],ebx ;unlock application_table_status mutex |
230 | mov [application_table_status],ebx ;unlock application_table_status mutex |
232 | mov eax,[process_number] ;set result |
231 | mov eax,[process_number] ;set result |
233 | ret |
232 | ret |
234 | .failed: |
233 | .failed: |
235 | mov eax, [save_cr3] |
234 | mov eax, [save_cr3] |
236 | call set_cr3 |
- | |
237 | .err: |
235 | call set_cr3 |
238 | ; popfd |
236 | .err: |
239 | .err_hdr: |
237 | .err_hdr: |
240 | stdcall kernel_free,[file_base] |
238 | stdcall kernel_free,[file_base] |
241 | .err_file: |
239 | .err_file: |
Line 332... | Line 330... | ||
332 | sub eax,CURRENT_TASK |
330 | sub eax,CURRENT_TASK |
333 | shr eax,5 ;calculate slot index |
331 | shr eax,5 ;calculate slot index |
334 | cmp eax,256 |
332 | cmp eax,256 |
335 | jge .failed ;it should be <256 |
333 | jge .failed ;it should be <256 |
336 | mov word [ebx+0xa],9 ;set process state to 9 (for slot after hight boundary) |
334 | mov word [ebx+0xa],9 ;set process state to 9 (for slot after hight boundary) |
337 | ; mov [new_process_place], eax |
- | |
338 | ret |
335 | ret |
339 | - | ||
340 | .failed: |
336 | .failed: |
341 | xor eax,eax |
337 | xor eax,eax |
342 | ret |
338 | ret |
343 | endp |
339 | endp |
Line 469... | Line 465... | ||
469 | 465 | ||
470 | stdcall map_page,edx,eax,dword PG_UW |
466 | stdcall map_page,edx,eax,dword PG_UW |
471 | add edx, 0x1000 |
467 | add edx, 0x1000 |
472 | dec [app_pages] |
468 | dec [app_pages] |
473 | jnz .alloc |
- | |
474 | 469 | jnz .alloc |
|
Line 475... | Line 470... | ||
475 | end if |
470 | end if |
476 | 471 | ||
Line 529... | Line 524... | ||
529 | call wait_mutex ;ebx |
524 | call wait_mutex ;ebx |
Line 530... | Line 525... | ||
530 | 525 | ||
531 | xor edx,edx |
526 | xor edx,edx |
532 | mov eax,0x2 |
527 | mov eax,0x2 |
533 | mov ebx, [pg_dir] |
- | |
534 | 528 | mov ebx, [pg_dir] |
|
535 | .loop: |
529 | .loop: |
536 | ;eax = current slot of process |
530 | ;eax = current slot of process |
537 | mov ecx,eax |
531 | mov ecx,eax |
538 | shl ecx,5 |
532 | shl ecx,5 |