pe export: alloc_pages, attach_int_handler

git-svn-id: svn://kolibrios.org@978 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2008-12-23 16:29:05 +00:00
parent f5e0b20ca6
commit 90718434fa
2 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,8 @@ PID_KERNEL equ 1 ;os_idle thread
align 4
proc attach_int_handler stdcall, irq:dword, handler:dword, access_rights:dword
push ebx
mov ebx, [irq] ;irq num
test ebx, ebx
jz .err
@ -41,9 +43,11 @@ proc attach_int_handler stdcall, irq:dword, handler:dword, access_rights:dword
mov [irq_owner + 4 * ebx], PID_KERNEL ; all handlers belong to a kernel
stdcall enable_irq, [irq]
pop ebx
mov eax, 1
ret
.err:
pop ebx
xor eax, eax
ret
endp

View File

@ -287,6 +287,7 @@ __exports:
free_kernel_space, 'FreeKernelSpace', \ ; stdcall
kernel_alloc, 'KernelAlloc', \ ; stdcall
kernel_free, 'KernelFree', \ ; stdcall
alloc_pages, 'AllocPages', \ ; stdcall
malloc, 'Kmalloc', \
free, 'Kfree', \
map_io_mem, 'MapIoMem', \ ; stdcall
@ -307,6 +308,7 @@ __exports:
pci_write32, 'PciWrite32', \ ; stdcall
\
reg_service, 'RegService', \ ; stdcall
attach_int_handler, 'AttachIntHandler', \ ; stdcall
user_alloc, 'UserAlloc', \ ; stdcall
user_free, 'UserFree', \ ; stdcall
unmap_pages, 'UnmapPages', \ ; eax, ecx