kos-acpi: update process list on process creation and destroy.

git-svn-id: svn://kolibrios.org@6261 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2016-02-20 05:49:47 +00:00
parent 81ef01a2b6
commit 7a7af713f0
3 changed files with 34 additions and 34 deletions

View File

@ -75,7 +75,7 @@ proc fs_execute
slot_base dd ?
file_base dd ?
file_size dd ?
handle dd ? ;temp. for default cursor handle for curr. thread
; handle dd ? ;temp. for default cursor handle for curr. thread
;app header data
hdr_cmdline dd ? ;0x00
hdr_path dd ? ;0x04
@ -87,15 +87,15 @@ proc fs_execute
pushad
cmp [SCR_MODE], word 0x13
jbe @f
pushad
stdcall set_cursor, [def_cursor_clock]
mov [handle], eax
mov [redrawmouse_unconditional], 1
call wakeup_osloop
popad
@@:
; cmp [SCR_MODE], word 0x13
; jbe @f
; pushad
; stdcall set_cursor, [def_cursor_clock]
; mov [handle], eax
; mov [redrawmouse_unconditional], 1
; call wakeup_osloop
; popad
;@@:
mov [flags], edx
; [ebp] pointer to filename
@ -256,6 +256,9 @@ proc fs_execute
test eax, eax
jz .failed
mov ebx, [sys_proc+LHEAD.prev]
__list_add eax, ebx, sys_proc
mov ebx, [hdr_mem]
mov [eax+PROC.mem_used], ebx
@ -274,8 +277,6 @@ proc fs_execute
@@:
mov [ebx+APPDATA.tls_base], edx
if GREEDY_KERNEL
else
mov ecx, [hdr_mem]
mov edi, [file_size]
add edi, 4095
@ -287,7 +288,6 @@ else
cld
rep stosb
@@:
end if
; release only virtual space, not phisical memory
@ -315,14 +315,14 @@ end if
call unlock_application_table
mov eax, esi
.final:
cmp [SCR_MODE], word 0x13
jbe @f
pushad
stdcall set_cursor, [handle]
mov [redrawmouse_unconditional], 1
call wakeup_osloop
popad
@@:
; cmp [SCR_MODE], word 0x13
; jbe @f
; pushad
; stdcall set_cursor, [handle]
; mov [redrawmouse_unconditional], 1
; call wakeup_osloop
; popad
;@@:
ret
endp
@ -632,11 +632,11 @@ align 4
.internal:
push ecx
mov esi, [ecx+PROC.dlls_list_ptr]
call destroy_all_hdlls
mov esi, ecx
list_del esi
; mov ecx, pg_data.mutex
; call mutex_lock
mov esi, [esi+PROC.dlls_list_ptr]
call destroy_all_hdlls
mov esi, [esp]
add esi, PROC.pdt_0
@ -657,9 +657,6 @@ align 4
call kernel_free ;ecx still in stack
stdcall map_page, [tmp_task_ptab], 0, PG_UNMAP
; mov ecx, pg_data.mutex
; call mutex_unlock
.exit:
ret

View File

@ -1100,6 +1100,9 @@ endg
first_app_found:
mov ecx, bios_fb
call set_framebuffer
; START MULTITASKING
; A 'All set - press ESC to start' messages if need

View File

@ -125,6 +125,7 @@ init_video:
mov esi, [LFBAddress]
bt [cpu_caps], CAPS_PSE
jnc .create_page_tables
mov edx, 0x00400000
or esi, PG_GLOBAL+PDE_LARGE+PAT_WC+PG_UWR
and esi, [pte_valid_mask]
@ -208,18 +209,17 @@ set_framebuffer:
lea esi, [ecx+FRB.pde]
mov eax, sys_proc
cld
pushfd
cli
mov [_display.current_lfb], ecx
.patch_pde:
lea edi, [eax+PROC.pdt_0+4096-32] ;last 8 pd entries up to 32Mb framebuffer
mov ecx, 8
mov ecx, 4
rep movsd ;patch pde
sub esi, 32
mov edi, [eax+PROC.list.next] ;next process/address space
xchg eax, edi
cmp eax, edi
sub esi, 16
mov eax, [eax+PROC.list.next] ;next process/address space
cmp eax, sys_proc
jne .patch_pde
bt [cpu_caps], CAPS_PGE