문제

I mean, how the kernel expose its function to user land application.

도움이 되었습니까?

해결책

Kernel functions are called using syscalls, which usually take form of filling some registers (type of syscall, parameters, ...) and doing a software interrupt (int 0x80) or sysenter instruction (if your architecture supports it).

If you're doing this on Linux, you might want to see some Linux syscall documentation, like one here: http://bluemaster.iu.hio.no/edu/dark/lin-asm/syscalls.html

There surely exists some similar documentation for other kernels (windows').

다른 팁

Assuming you are talking about Linux, you put your arguments in registers and call interrupt 0x80. The name for this is "system call" See these links:

Windows is probably similar, this looks like a good article:

http://www.codeguru.com/cpp/w-p/system/devicedriverdevelopment/article.php/c8035

etc... google

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top