/kernel/trunk/core/malloc.inc |
---|
File deleted |
/kernel/trunk/core/taskman.inc |
---|
310,8 → 310,7 |
app_tabs dd ? |
endl |
mov ebx, pg_data.pg_mutex |
call wait_mutex ;ebx |
stdcall wait_mutex, pg_data.pg_mutex |
xor eax, eax |
mov [dir_addr], eax |
492,8 → 491,7 |
align 4 |
proc destroy_app_space stdcall, pg_dir:dword |
mov ebx, pg_data.pg_mutex |
call wait_mutex ;ebx |
stdcall wait_mutex, pg_data.pg_mutex |
xor edx,edx |
mov eax,0x2 |
573,8 → 571,7 |
mov eax, [ebp] |
mov [filename], eax |
mov ebx, pg_data.tmp_task_mutex |
call wait_mutex ;ebx |
stdcall wait_mutex, pg_data.tmp_task_mutex |
mov edi, [tmp_task_data] |
mov ecx, (1024+256)/4 |
944,25 → 941,24 |
ret |
endp |
; param |
; ebx=mutex |
align 4 |
wait_mutex: |
push eax |
push ebx |
proc wait_mutex stdcall, mutex:dword |
mov ebx, [mutex] |
.wait_lock: |
cmp dword [ebx],0 |
je .get_lock |
push ebx |
call change_task |
jmp wait_mutex |
pop ebx |
jmp .wait_lock |
.get_lock: |
mov eax, 1 |
xchg eax, [ebx] |
test eax, eax |
jnz wait_mutex |
pop ebx |
pop eax |
jnz .wait_lock |
ret |
endp |
align 4 |
proc set_app_params stdcall,slot:dword, params:dword,\ |
/kernel/trunk/core/memory.inc |
---|
370,8 → 370,7 |
align 4 |
proc new_mem_resize stdcall, new_size:dword |
mov ebx, pg_data.pg_mutex |
call wait_mutex ;ebx |
stdcall wait_mutex, pg_data.pg_mutex |
mov edi, [new_size] |
add edi,4095 |
1276,10 → 1275,10 |
align 16 |
cur_saved_data rb 4096 |
;cursors rb CURSOR_SIZE*64 |
;cursor_map rd 2 |
;cursor_start rd 1 |
;cursor_end rd 1 |
cursors rb CURSOR_SIZE*64 |
cursor_map rd 2 |
cursor_start rd 1 |
cursor_end rd 1 |
def_cursor rd 1 |
hw_cursor rd 1 |
1298,8 → 1297,6 |
uglobal |
align 16 |
mst MEM_STATE |
dll_tab rb 32*32 |
srv_tab rb 36*32 |
mem_block_map rb 512 |
/kernel/trunk/kernel.asm |
---|
406,8 → 406,6 |
call init_mtrr |
call init_fpu |
call init_malloc |
stdcall alloc_kernel_space, 0x4F000 |
mov [ipc_tmp], eax |
mov ebx, 0x1000 |
/kernel/trunk/kernel32.inc |
---|
223,7 → 223,6 |
include "core/fpu.inc" ; all fpu/sse support |
include "core/memory.inc" |
include "core/heap.inc" ; kernel and app heap |
include "core/malloc.inc" ; small kernel heap |
include "core/taskman.inc" |
include "core/dll.inc" |
include "core/exports.inc" |
/kernel/trunk/video/cursors.inc |
---|
261,25 → 261,6 |
endp |
align 4 |
alloc_cursor: |
mov eax, CURSOR_SIZE |
call malloc |
test eax, eax |
jz .fail |
xor ebx, ebx |
mov [eax+CURSOR.magic], 'CURS' |
mov [eax+CURSOR.size], CURSOR_SIZE |
mov [eax+CURSOR.pid], ebx |
mov [eax+CURSOR.hot_x], ebx |
mov [eax+CURSOR.hot_y], ebx |
.fail: |
ret |
if 0 |
align 4 |
proc alloc_cursor |
pushfd |
314,7 → 295,6 |
ret |
endp |
align 4 |
proc free_cursor |
pushfd |
342,7 → 322,6 |
ret |
endp |
end if |
align 4 |
proc set_cursor stdcall, hcursor:dword |
486,7 → 465,8 |
stdcall kernel_free, [esi+CURSOR.base] |
.exit: |
mov eax, [hcursor] |
call free |
call free_cursor |
ret |
.fail: |
ret |
endp |
509,7 → 489,6 |
.init: |
mov [cur_def_interl], ebx |
if 0 |
xor eax, eax |
mov edi, cursors |
mov ecx, CURSOR_SIZE*16 |
523,7 → 502,7 |
mov [cursor_start], edx |
add edx, 8 |
mov [cursor_end], edx |
end if |
stdcall load_driver, drv_hw_mouse |
mov [hw_cursor], eax |
test eax, eax |
/kernel/trunk/const.inc |
---|
363,16 → 363,6 |
BOOT_DATA BOOT_DATA |
end virtual |
struc MEM_STATE |
{ .mutex rd 1 |
.smallmap rd 1 |
.treemap rd 1 |
.topsize rd 1 |
.top rd 1 |
.smallbins rd 4*32 |
.treebins rd 32 |
} |
struc PG_DATA |
{ .mem_amount dd ? |
.vesa_mem dd ? |