How to write System calls?
Yes -- system calls can be implemented
as modules.prog8.c is a module.prog9.c is a user-space program.
In <asm/unistd.h> -- add
#define __NR_my_func 250
----- Original Message -----
From: Matthieu Delahaye <[email protected]>
Date: Tuesday, October 30, 2001 2:41 pm
Subject: Re: How to write System calls?
Quoted 50 lines
Hi,
First, I propose you to have a look on "Linux Kernel 2.4 Internals" from
Tigran Aivazian. You can read it from the LDP at exact URL:
http://www.linuxdoc.org/LDP/lki/index.html
In this, you'll probably see that syscalls are hardcoded (filearch/xxx/kernel/entry.Son your kernel tree).
This means, AFAIK, you cannot implements a syscall function in a module ;-)
One other way is using your modules to implements char drivers and useioctl()as if it was yours syscalls. This method is generally recommended to users who wants to implement new sayscalls.Am I wrong?
Regards,
MatthieuQuoted 4 lines · Sureshkumar Kamalanathan
Hi All,
Good day!
I have 2.4.4 kernel. I have to write some system calls for
interaction with the kernel from the userland. Can any of youtell me
Quoted 4 lines
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 Loadablemodules.> Any pointers in this regard will be highly appreciated and I'll very
Quoted 8 lines
grateful!!
Thanks in advance,
Regards,
Suresh.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Quoted 4 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines
-
To unsubscribe from this list: send the line "unsubscribe linux- kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[email protected] and delete this mail from your records.
------------------------------------------------------------------------------------------------------------------------