Messages in this thread |  | | From | Keith Owens <> | Subject | Re: How to write System calls? | Date | Wed, 31 Oct 2001 12:35:54 +1100 |
| |
On Mon, 29 Oct 2001 16:46:49 +0530, Sureshkumar Kamalanathan <skk@sasken.com> wrote: > I have 2.4.4 kernel. I have to write some system calls for >interaction with the kernel from the userland. Can any of you tell me >where I can get the information regarding this? > I have the Linux Kernel Internals by Beck and others. But it gives >the procedure only for 2.2.x. > Moreover I need to implement these system calls as Loadable modules.
Syscall entries are hard coded into the syscall table, usually in arch/$(ARCH)/entry.S.
There is no generic way to add a syscall that is serviced by a module. I know that the modutils HOWTO gives examples of syscalls in modules but that doc is out of date, on some architectures you have to adjust additional registers to make a remote function call. On those systems the syscall table works because the kernel is compiled with special flags, that will not work for modules. Also Linus has said that he does not want modules to be able to override syscalls.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |