diff --git a/kernel/trunk/core/dll.inc b/kernel/trunk/core/dll.inc index 88a112c106..8e069a6e5b 100644 --- a/kernel/trunk/core/dll.inc +++ b/kernel/trunk/core/dll.inc @@ -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 diff --git a/kernel/trunk/core/peload.inc b/kernel/trunk/core/peload.inc index 52a40bcee1..abc4479f52 100644 --- a/kernel/trunk/core/peload.inc +++ b/kernel/trunk/core/peload.inc @@ -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