lkml.org 
[lkml]   [2001]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: How to write System calls?
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:12    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site