forked from KolibriOS/kolibrios
kolibri-process:use per-process pointers to HDLL structure
git-svn-id: svn://kolibrios.org@4433 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a7414ad7ff
commit
5647b8ca46
@ -1095,10 +1095,9 @@ proc load_library stdcall, file_name:dword
|
||||
; ignore timestamp
|
||||
cli
|
||||
|
||||
mov esi, [CURRENT_TASK]
|
||||
shl esi, 8
|
||||
mov esi, [current_process]
|
||||
lea edi, [fullname]
|
||||
mov ebx, [esi+SLOT_BASE+APPDATA.dlls_list_ptr]
|
||||
mov ebx, [esi+PROC.dlls_list_ptr]
|
||||
test ebx, ebx
|
||||
jz .not_in_process
|
||||
mov esi, [ebx+HDLL.fd]
|
||||
@ -1458,28 +1457,21 @@ endp
|
||||
; out: eax = APPDATA.dlls_list_ptr if all is OK,
|
||||
; NULL if memory allocation failed
|
||||
init_dlls_in_thread:
|
||||
mov ebx, [current_slot]
|
||||
mov eax, [ebx+APPDATA.dlls_list_ptr]
|
||||
mov ebx, [current_process]
|
||||
mov eax, [ebx+PROC.dlls_list_ptr]
|
||||
test eax, eax
|
||||
jnz .ret
|
||||
push [ebx+APPDATA.process]
|
||||
|
||||
mov eax, 8
|
||||
call malloc
|
||||
pop edx
|
||||
call malloc ; FIXME
|
||||
test eax, eax
|
||||
jz .ret
|
||||
|
||||
mov [eax], eax
|
||||
mov [eax+4], eax
|
||||
mov ecx, [TASK_COUNT]
|
||||
mov ebx, SLOT_BASE+256
|
||||
.set:
|
||||
cmp [ebx+APPDATA.process], edx
|
||||
jnz @f
|
||||
mov [ebx+APPDATA.dlls_list_ptr], eax
|
||||
@@:
|
||||
add ebx, 256
|
||||
dec ecx
|
||||
jnz .set
|
||||
|
||||
mov ebx, [current_process]
|
||||
mov [ebx+PROC.dlls_list_ptr], eax
|
||||
.ret:
|
||||
ret
|
||||
|
||||
|
@ -625,11 +625,6 @@ end if
|
||||
pop ebx ;restore exception number (#PF)
|
||||
ret
|
||||
|
||||
; xchg bx, bx
|
||||
; add esp,12 ;clear in stack: locals(.err_addr) + #PF + ret_to_caller
|
||||
; restore_ring3_context
|
||||
; iretd
|
||||
|
||||
.user_space:
|
||||
test eax, PG_MAP
|
||||
jnz .err_access ;Страница присутствует
|
||||
@ -669,9 +664,8 @@ end if
|
||||
; access denied? this may be a result of copy-on-write protection for DLL
|
||||
; check list of HDLLs
|
||||
and ebx, not 0xFFF
|
||||
mov eax, [CURRENT_TASK]
|
||||
shl eax, 8
|
||||
mov eax, [SLOT_BASE+eax+APPDATA.dlls_list_ptr]
|
||||
mov eax, [current_process]
|
||||
mov eax, [eax+PROC.dlls_list_ptr]
|
||||
test eax, eax
|
||||
jz .fail
|
||||
mov esi, [eax+HDLL.fd]
|
||||
@ -904,7 +898,8 @@ proc safe_map_page stdcall, slot:dword, req_access:dword, ofs:dword
|
||||
push ebx ecx
|
||||
mov eax, [slot]
|
||||
shl eax, 8
|
||||
mov eax, [SLOT_BASE+eax+APPDATA.dlls_list_ptr]
|
||||
mov eax, [SLOT_BASE+eax+APPDATA.process]
|
||||
mov eax, [eax+PROC.dlls_list_ptr]
|
||||
test eax, eax
|
||||
jz .no_hdll
|
||||
mov ecx, [eax+HDLL.fd]
|
||||
|
@ -980,9 +980,6 @@ proc new_sys_threads
|
||||
mov eax, [ebx+APPDATA.process]
|
||||
mov [edx+APPDATA.process], eax
|
||||
|
||||
mov eax, [ebx+APPDATA.dlls_list_ptr]
|
||||
mov [edx+APPDATA.dlls_list_ptr], eax
|
||||
|
||||
mov eax, [ebx+APPDATA.tls_base]
|
||||
test eax, eax
|
||||
jz @F
|
||||
|
@ -105,6 +105,7 @@ struct PROC
|
||||
heap_base rd 1 ;
|
||||
heap_top rd 1 ;
|
||||
mem_used rd 1
|
||||
dlls_list_ptr rd 1
|
||||
pdt_0_phys rd 1
|
||||
pdt_1_phys rd 1
|
||||
io_map_0 rd 1
|
||||
@ -140,7 +141,7 @@ struct APPDATA
|
||||
wait_test dd ? ;+96 +++
|
||||
wait_param dd ? ;+100 +++
|
||||
tls_base dd ? ;+104
|
||||
dlls_list_ptr dd ? ;+108
|
||||
dd ? ;+108
|
||||
event_filter dd ? ;+112
|
||||
draw_bgr_x dd ? ;+116
|
||||
draw_bgr_y dd ? ;+120
|
||||
|
Loading…
Reference in New Issue
Block a user